-
-
Notifications
You must be signed in to change notification settings - Fork 3
setuser_privileges.3
Manvendra Bhangui edited this page Feb 25, 2024
·
4 revisions
setuser_privileges - set user identity
#include <setuserid.h>
int setuser_privileges(uid_t uid, gid_t gid, char* user);
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
setuid(2) setgid(2) setgroups(2) qgetpwnam(3), qgetpwuid(3), qgetpwnam_r(3) qgetpwuid_r(3), qgetgrnam(3), qgetgrgid(3), qgetgrnam_r(3), qgetgrgid_r(3), qgetpwent(3), qsetpwent(3), qendpwent(3), qgetgrent(3), qsetgrent(3), qendgrent(3), grpscan(3), grpscan(3), setuserid(3),