You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manvendra Bhangui edited this page Feb 25, 2024
·
4 revisions
NAME
setuser_privileges - set user identity
SYNTAX
#include <setuserid.h>
int setuser_privileges(uid_t uid, gid_t gid, char* user);
DESCRIPTION
setuserid_privileges sets the effective user ID to uid, effective
group ID to gid, supplementary groups of the user user to its uid,
gid obtained from passwd(5) and group(5) databases. It uses setuid(2),
setgid(2), setgroups(2), getpwnam(3), getgrent(3).
setuser_privileges returns -1 on failure, 0 on success