From 602766ecff63f7ea4267336ba85fe969283bb212 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 20 Oct 2016 11:38:31 -0400 Subject: [PATCH] Remove run-as compat wrapper from internal code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/ust-registry.c | 2 +- src/common/runas.h | 6 ------ src/common/ust-consumer/ust-consumer.c | 4 ++-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/lttng-sessiond/ust-registry.c b/src/bin/lttng-sessiond/ust-registry.c index 6913487d5..3c3aa91f0 100644 --- a/src/bin/lttng-sessiond/ust-registry.c +++ b/src/bin/lttng-sessiond/ust-registry.c @@ -994,7 +994,7 @@ void ust_registry_session_destroy(struct ust_registry_session *reg) /* * Try deleting the directory hierarchy. */ - (void) run_as_recursive_rmdir(reg->root_shm_path, + (void) run_as_rmdir_recursive(reg->root_shm_path, reg->uid, reg->gid); } /* Destroy the enum hash table */ diff --git a/src/common/runas.h b/src/common/runas.h index ac1143eec..46d4502e9 100644 --- a/src/common/runas.h +++ b/src/common/runas.h @@ -34,12 +34,6 @@ int run_as_unlink(const char *path, uid_t uid, gid_t gid); LTTNG_HIDDEN int run_as_rmdir_recursive(const char *path, uid_t uid, gid_t gid); -/* Backward compat. */ -static inline int run_as_recursive_rmdir(const char *path, uid_t uid, gid_t gid) -{ - return run_as_rmdir_recursive(path, uid, gid); -} - LTTNG_HIDDEN int run_as_create_worker(char *procname); LTTNG_HIDDEN diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 01d5ecf65..76eee2ad9 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -510,7 +510,7 @@ error_open: } /* Try to rmdir all directories under shm_path root. */ if (channel->root_shm_path[0]) { - (void) run_as_recursive_rmdir(channel->root_shm_path, + (void) run_as_rmdir_recursive(channel->root_shm_path, channel->uid, channel->gid); } free(stream_fds); @@ -2067,7 +2067,7 @@ void lttng_ustconsumer_free_channel(struct lttng_consumer_channel *chan) ustctl_destroy_channel(chan->uchan); /* Try to rmdir all directories under shm_path root. */ if (chan->root_shm_path[0]) { - (void) run_as_recursive_rmdir(chan->root_shm_path, + (void) run_as_rmdir_recursive(chan->root_shm_path, chan->uid, chan->gid); } free(chan->stream_fds); -- 2.34.1