Return to uidswap.c CVS log | Up to [local] / src / usr.bin / ssh |
version 1.40, 2018/06/15 07:01:11 | version 1.41, 2018/07/18 11:34:04 | ||
---|---|---|---|
|
|
||
if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) != 0) | if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) != 0) | ||
fatal("setresuid %u: %s", (u_int)pw->pw_uid, strerror(errno)); | fatal("setresuid %u: %s", (u_int)pw->pw_uid, strerror(errno)); | ||
} | } | ||
void | |||
permanently_drop_suid(uid_t uid) | |||
{ | |||
debug("permanently_drop_suid: %u", (u_int)uid); | |||
if (setresuid(uid, uid, uid) != 0) | |||
fatal("setresuid %u: %s", (u_int)uid, strerror(errno)); | |||
} |