- # pwd = getpwnam(user); ...
- # ngroups = MAX_GROUPS;
- # status = getgrouplist(user, pwd->pw_gid, groups, &ngroups); ...
- # status = setgroups(ngroups, groups); ...
- # status = setgid(pwd->pw_gid); ...
- # status = setuid(pwd->pw_uid); ...
+ # pwd = getpwnam(user); ...
+ # ngroups = MAX_GROUPS;
+ # status = getgrouplist(user, pwd->pw_gid, groups, &ngroups); ...
+ # status = setgroups(ngroups, groups); ...
+ # status = setgid(pwd->pw_gid); ...
+ # status = setuid(pwd->pw_uid); ...