Lines Matching refs:pwd
43 struct passwd *pwd = 0; in login_main() local
74 if ((pwd = getpwnam(username))) { in login_main()
76 if (TT.f || !*pwd->pw_passwd) break; in login_main()
79 if (*(pass = pwd->pw_passwd) == 'x') { in login_main()
95 syslog(LOG_WARNING, "invalid password for '%s' on %s %s%s", pwd->pw_name, in login_main()
102 pwd = 0; in login_main()
106 if (!pwd) error_exit("max retries (3)"); in login_main()
110 if (pwd->pw_uid && !access("/etc/nologin", R_OK)) { in login_main()
119 if (fchown(tty, pwd->pw_uid, pwd->pw_gid) || fchmod(tty, 0600)) in login_main()
121 xsetuser(pwd); in login_main()
122 reset_env(pwd, !FLAG(p)); in login_main()
127 syslog(LOG_INFO, "%s logged in on %s %s %s", pwd->pw_name, in login_main()
131 execl(pwd->pw_shell, xmprintf("-%s", pwd->pw_shell), (char *)0); in login_main()
132 perror_exit("exec shell '%s'", pwd->pw_shell); in login_main()