Lines Matching refs:pw
42 struct passwd *pw;
73 pw = getpwuid(cur_uid);
74 old_user = pw ? xstrdup(pw->pw_name) : "";
83 pw = xgetpwnam(opt_username);
85 if (cur_uid == 0 || correct_password(pw)) {
105 /* Make sure pw->pw_shell is non-NULL. It may be NULL when NEW_USER
108 if (!pw->pw_shell || !pw->pw_shell[0])
109 pw->pw_shell = (char *)DEFAULT_SHELL;
112 if (opt_shell && cur_uid != 0 && restricted_shell(pw->pw_shell)) {
124 opt_shell = pw->pw_shell;
126 change_identity(pw);
130 pw);