Add rmdirat and renameat to run-as commands
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 28 Jun 2019 21:14:11 +0000 (17:14 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Sep 2019 20:39:14 +0000 (16:39 -0400)
commitfcde531afedaadb5dadad502e42008718d73bd76
treeeeec1e57ccc966dd4a61c6cb54f781adc661eb92
parent8bb324522da8bba7828d3dcdcf697274aad32a58
Add rmdirat and renameat to run-as commands

Add support for the rmdirat and renameat commands to the run-as
infrastructure. These commands use the directory_handle compatibility
layer to provide rename and directory deletion relative to a
(or multiple) directory file descriptors.

The rmdirat name is used even though there are no rmdirat syscall
(at least on Linux). The functionality that would be provided by
rmdirat() (vs rmdir) is provided through unlinkat(..., AT_REMOVEDIR).

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
12 files changed:
.gitignore
src/bin/lttng-sessiond/session.c
src/common/compat/directory-handle.c
src/common/compat/directory-handle.h
src/common/dynamic-array.c
src/common/dynamic-array.h
src/common/runas.c
src/common/runas.h
src/common/trace-chunk.c
src/common/utils.c
tests/unit/Makefile.am
tests/unit/test_directory_handle.c [new file with mode: 0644]
This page took 0.026848 seconds and 4 git commands to generate.