Lines Matching refs:pwd
52 struct passwd *pwd = 0;
87 pwd = getpwnam(username);
88 if (pwd && *pwd->pw_passwd != '!' && *pwd->pw_passwd != '*') {
91 if (TT.username || !*pwd->pw_passwd) break;
94 if (*(pass = pwd->pw_passwd) == 'x') {
110 syslog(LOG_WARNING, "invalid password for '%s' on %s %s%s", pwd->pw_name,
117 pwd = 0;
124 if (!pwd) error_exit("max retries (3)");
128 if (pwd->pw_uid && !access("/etc/nologin", R_OK)) {
137 xsetuser(pwd);
139 if (chdir(pwd->pw_dir)) printf("bad $HOME: %s\n", pwd->pw_dir);
148 setenv("USER", pwd->pw_name, 1);
149 setenv("LOGNAME", pwd->pw_name, 1);
150 setenv("HOME", pwd->pw_dir, 1);
151 setenv("SHELL", pwd->pw_shell, 1);
159 syslog(LOG_INFO, "%s logged in on %s %s %s", pwd->pw_name,
163 execl(pwd->pw_shell, xmprintf("-%s", pwd->pw_shell), (char *)0);
164 perror_exit("exec shell '%s'", pwd->pw_shell);