Lines Matching defs:pw
159 auth_sock_cleanup_proc(struct passwd *pw)
162 temporarily_use_uid(pw);
171 auth_input_request_forwarding(struct ssh *ssh, struct passwd * pw)
182 temporarily_use_uid(pw);
221 temporarily_use_uid(pw);
247 prepare_auth_info_file(struct passwd *pw, struct sshbuf *info)
254 temporarily_use_uid(pw);
322 setproctitle("%s", authctxt->pw->pw_name);
346 prepare_auth_info_file(authctxt->pw, authctxt->session_info);
672 s->pw->pw_name,
679 temporarily_use_uid(s->pw);
759 struct passwd *pw = s->pw;
765 snprintf(buf, sizeof(buf), "%.200s/.hushlogin", pw->pw_dir);
830 struct passwd *pw = s->pw;
848 child_set_env(&env, &envsize, "USER", pw->pw_name);
849 child_set_env(&env, &envsize, "LOGNAME", pw->pw_name);
850 child_set_env(&env, &envsize, "HOME", pw->pw_dir);
851 if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH) < 0)
856 snprintf(buf, sizeof buf, "%.200s/%.50s", _PATH_MAILDIR, pw->pw_name);
899 pw->pw_dir, _PATH_SSH_USER_DIR);
962 xasprintf(&user_rc, "%s/%s", s->pw->pw_dir, _PATH_SSH_USER_RC);
1026 do_nologin(struct passwd *pw)
1032 if (login_getcapbool(lc, "ignorenologin", 0) || pw->pw_uid == 0)
1043 logit("User %.100s not allowed because %s exists", pw->pw_name, nl);
1108 do_setusercontext(struct passwd *pw)
1114 if (setusercontext(lc, pw, pw->pw_uid,
1123 pw->pw_uid);
1125 (unsigned long long)pw->pw_uid);
1126 chroot_path = percent_expand(tmp, "h", pw->pw_dir,
1127 "u", pw->pw_name, "U", uidstr, (char *)NULL);
1128 safely_chroot(chroot_path, pw->pw_uid);
1138 if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) {
1147 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid)
1148 fatal("Failed to set uids to %u.", (u_int) pw->pw_uid);
1222 struct passwd *pw = s->pw;
1232 do_setusercontext(pw);
1242 do_nologin(pw);
1243 do_setusercontext(pw);
1249 shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell;
1291 if (k_afs_cell_of_file(pw->pw_dir, cell, sizeof(cell)) == 0)
1296 s->authctxt->krb5_fwd_ccache, NULL, NULL, pw->pw_dir);
1301 if (chdir(pw->pw_dir) == -1) {
1306 "directory %s: %s\n", pw->pw_dir,
1331 setproctitle("%s@%s", s->pw->pw_name, INTERNAL_SFTP_NAME);
1339 exit(sftp_server_main(i, argv, s->pw));
1477 s->pw = authctxt->pw;
1478 if (s->pw == NULL || !authctxt->valid)
1633 s->pw->pw_name);
1660 "subsystem not found", s->subsys, s->pw->pw_name);
1831 temporarily_use_uid(s->pw);
1864 return auth_input_request_forwarding(ssh, s->pw);
2102 s->pw->pw_name,
2221 if (s->pw == NULL)
2224 setproctitle("%s@%s", s->pw->pw_name, session_tty_list());
2324 auth_sock_cleanup_proc(authctxt->pw);
2328 temporarily_use_uid(authctxt->pw);