Skip to content

Commit 1fe89ff

Browse files
Gleb O. Raikogit-core
authored andcommitted
Remove all occurences of req_uid
1 parent 7d97cfe commit 1fe89ff

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

su.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ int main(int argc, char *argv[])
296296
static int socket_serv_fd = -1;
297297
char buf[64], shell[PATH_MAX], *result;
298298
int i, dballow;
299-
unsigned req_uid;
300299
mode_t orig_umask;
301300

302301
for (i = 1; i < argc; i++) {
@@ -363,10 +362,8 @@ int main(int argc, char *argv[])
363362
deny();
364363
}
365364

366-
req_uid = st.st_uid;
367-
368365
if (mkdir(REQUESTOR_CACHE_PATH, 0770) >= 0) {
369-
chown(REQUESTOR_CACHE_PATH, req_uid, req_uid);
366+
chown(REQUESTOR_CACHE_PATH, st.st_uid, st.st_gid);
370367
}
371368

372369
setgroups(0, NULL);

0 commit comments

Comments
 (0)