Uid/Gid fix

This commit is contained in:
Robert Swiecki 2017-02-08 00:42:23 +01:00
parent 4a154733e0
commit 9f832aa35a

View File

@ -227,7 +227,7 @@ static bool cmdlineParseUid(struct nsjconf_t *nsjconf, char *str)
} }
if (str == second) { if (str == second) {
outside_uid = inside_uid; outside_uid = getuid();
} else { } else {
pw = getpwnam(second); pw = getpwnam(second);
if (pw != NULL) { if (pw != NULL) {
@ -269,9 +269,8 @@ static bool cmdlineParseGid(struct nsjconf_t *nsjconf, char *str)
} }
if (str == second) { if (str == second) {
outside_gid = inside_gid; outside_gid = getgid();
} else { } else {
gr = getgrnam(second); gr = getgrnam(second);
if (gr != NULL) { if (gr != NULL) {
outside_gid = gr->gr_gid; outside_gid = gr->gr_gid;