From: Jérémie Galarneau Date: Thu, 20 Oct 2016 15:38:31 +0000 (-0400) Subject: Remove run-as compat wrapper from internal code X-Git-Tag: v2.10.0-rc1~116 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=602766ecff63f7ea4267336ba85fe969283bb212;p=lttng-tools.git Remove run-as compat wrapper from internal code Signed-off-by: Jérémie Galarneau --- 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);