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, 25 Jul 2019 19:51:46 +0000 (15:51 -0400)
commit93bed9fe8f48c11b7bb1224db36d82404cea080d
treed2b4f2f9a483c264a0db50ce7298c0cd03d5ce6b
parentbbbfd84979130a11aebf172cf7d0d24e28165258
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.028397 seconds and 4 git commands to generate.