X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Frunas.c;h=36be188fafb54036688930689d1d23781cbe000d;hb=d77dded285b058e4242c8a3d2233f80e725ceefc;hp=9d9091638a5a9910c8cec2b6810357ca087e4499;hpb=6addfa379ee608b20cfe5e15d135bcb6a9724e90;p=lttng-tools.git diff --git a/src/common/runas.c b/src/common/runas.c index 9d9091638..36be188fa 100644 --- a/src/common/runas.c +++ b/src/common/runas.c @@ -101,6 +101,9 @@ int use_clone(void) } #endif +LTTNG_HIDDEN +int _utils_mkdir_recursive_unsafe(const char *path, mode_t mode); + /* * Create recursively directory using the FULL path. */ @@ -114,7 +117,8 @@ int _mkdir_recursive(void *_data) path = data->path; mode = data->mode; - return utils_mkdir_recursive(path, mode); + /* Safe to call as we have transitioned to the requested uid/gid. */ + return _utils_mkdir_recursive_unsafe(path, mode); } static