X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Frunas.c;h=36be188fafb54036688930689d1d23781cbe000d;hp=9d9091638a5a9910c8cec2b6810357ca087e4499;hb=d77dded285b058e4242c8a3d2233f80e725ceefc;hpb=4628484ae860b8cf506427e864c7d1933da32777 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