Lines Matching refs:pw
617 struct passwd *pw = NULL;
618 pw = getpwnam(username);
619 if (pw) {
620 if (initgroups(username, pw->pw_gid) != 0 || setgid(pw->pw_gid) != 0 || setuid(pw->pw_uid) != 0) {
622 username, pw->pw_uid, pw->pw_gid);
637 struct passwd *pw = NULL;
653 pw = getpwnam(username);
655 if (stat(conf_file, st) || pw == NULL)
665 ((st->st_mode & S_IWGRP && pw->pw_gid == st->st_gid) ||
666 (st->st_mode & S_IWUSR && pw->pw_uid == st->st_uid))) {