We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d97cfe commit 1fe89ffCopy full SHA for 1fe89ff
su.c
@@ -296,7 +296,6 @@ int main(int argc, char *argv[])
296
static int socket_serv_fd = -1;
297
char buf[64], shell[PATH_MAX], *result;
298
int i, dballow;
299
- unsigned req_uid;
300
mode_t orig_umask;
301
302
for (i = 1; i < argc; i++) {
@@ -363,10 +362,8 @@ int main(int argc, char *argv[])
363
362
deny();
364
}
365
366
- req_uid = st.st_uid;
367
-
368
if (mkdir(REQUESTOR_CACHE_PATH, 0770) >= 0) {
369
- chown(REQUESTOR_CACHE_PATH, req_uid, req_uid);
+ chown(REQUESTOR_CACHE_PATH, st.st_uid, st.st_gid);
370
371
372
setgroups(0, NULL);
0 commit comments