Lines Matching defs:runas_pw
106 static struct passwd *runas_pw = NULL;
540 runas_pw = getpwuid((uid_t)atoi(username));
542 runas_pw = getpwnam(username);
545 if (runas_pw == NULL)
549 if (initgroups(runas_pw->pw_name, runas_pw->pw_gid) < 0) {
560 if (runas_pw == NULL || done_setuid)
578 if (setgid(runas_pw->pw_gid) < 0) {
583 if (setuid(runas_pw->pw_uid) < 0) {
606 if (runas_pw == NULL)
608 return (runas_pw->pw_uid);
737 if (runas_pw != NULL &&
738 chown(filename, runas_pw->pw_uid,
739 runas_pw->pw_gid) == -1) {
818 if (switch_user && runas_pw != NULL) {
823 setperms(runas_pw->pw_uid, runas_pw->pw_gid);