Fix: run_as_mkdirat returns value of errno
[lttng-tools.git] / src / common / runas.c
index 45aad109a00904804a009e285a8bb829f115add9..ef169d3207903367d6e38e9625b656b210f98d02 100644 (file)
@@ -1215,7 +1215,7 @@ int run_as_mkdirat(int dirfd, const char *path, mode_t mode,
        run_as(dirfd == AT_FDCWD ? RUN_AS_MKDIR : RUN_AS_MKDIRAT,
                        &data, &run_as_ret, uid, gid);
        errno = run_as_ret._errno;
-       ret = run_as_ret._errno;
+       ret = run_as_ret.u.mkdirat.ret;
 error:
        return ret;
 }
This page took 0.023305 seconds and 4 git commands to generate.