mirror of
https://github.com/moparisthebest/sslh
synced 2024-11-25 02:22:19 -05:00
drop_privileges: fix setuid check
The code attempts to check the return of setuid, but forgets to assign the result variable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
c54e232673
commit
b8ea0699c4
2
common.c
2
common.c
@ -511,7 +511,7 @@ void drop_privileges(const char* user_name)
|
|||||||
|
|
||||||
res = setgid(pw->pw_gid);
|
res = setgid(pw->pw_gid);
|
||||||
CHECK_RES_DIE(res, "setgid");
|
CHECK_RES_DIE(res, "setgid");
|
||||||
setuid(pw->pw_uid);
|
res = setuid(pw->pw_uid);
|
||||||
CHECK_RES_DIE(res, "setuid");
|
CHECK_RES_DIE(res, "setuid");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user