Home | History | Annotate | Download | only in openssh

Lines Matching defs:pw

171 auth_sock_cleanup_proc(struct passwd *pw)
174 temporarily_use_uid(pw);
183 auth_input_request_forwarding(struct passwd * pw)
194 temporarily_use_uid(pw);
256 setproctitle("%s", authctxt->pw->pw_name);
297 s->pw = authctxt->pw;
365 success = auth_input_request_forwarding(s->pw);
378 if (channel_input_port_forward_request(s->pw->pw_uid == 0,
560 cray_init_job(s->pw); /* set up cray jid and tmpdir */
701 cray_init_job(s->pw); /* set up cray jid and tmpdir */
767 record_utmp_only(pid, s->tty, s->pw->pw_name,
821 s->pw->pw_name,
829 char *shell = s->pw->pw_shell;
859 struct passwd * pw = s->pw;
878 record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
936 struct passwd *pw = s->pw;
942 snprintf(buf, sizeof(buf), "%.200s/.hushlogin", pw->pw_dir);
1143 struct passwd *pw = s->pw;
1180 child_set_env(&env, &envsize, "USER", pw->pw_name);
1181 child_set_env(&env, &envsize, "LOGNAME", pw->pw_name);
1183 child_set_env(&env, &envsize, "LOGIN", pw->pw_name);
1185 child_set_env(&env, &envsize, "HOME", pw->pw_dir);
1187 if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH) < 0)
1200 read_etc_default_login(&env, &envsize, pw->pw_uid);
1205 s->pw->pw_uid == 0 ?
1213 _PATH_MAILDIR, pw->pw_name);
1318 strcmp(pw->pw_dir, "/") ? pw->pw_dir : "");
1404 do_nologin(struct passwd *pw)
1411 if (login_getcapbool(lc, "ignorenologin", 0) || pw->pw_uid == 0)
1415 if (pw->pw_uid == 0)
1426 logit("User %.100s not allowed because %s exists", pw->pw_name, nl);
1492 do_setusercontext(struct passwd *pw)
1499 platform_setusercontext(pw);
1503 if (setusercontext(lc, pw, pw->pw_uid,
1509 if (setlogin(pw->pw_name) < 0)
1511 if (setgid(pw->pw_gid) < 0) {
1516 if (initgroups(pw->pw_name, pw->pw_gid) < 0) {
1525 platform_setusercontext_post_groups(pw);
1530 pw->pw_uid);
1531 chroot_path = percent_expand(tmp, "h", pw->pw_dir,
1532 "u", pw->pw_name, (char *)NULL);
1533 safely_chroot(chroot_path, pw->pw_uid);
1545 if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) {
1553 (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUMASK);
1563 if ((doing_chroot == 0) && set_id(pw->pw_name) != 0) {
1564 fatal("set_id(%s) Failed", pw->pw_name);
1568 permanently_set_uid(pw);
1575 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid)
1576 fatal("Failed to set uids to %u.", (u_int) pw->pw_uid);
1591 execl(_PATH_PASSWD_PROG, "passwd", s->pw->pw_name,
1605 launch_login(struct passwd *pw, const char *hostname)
1614 "-p", "-f", pw->pw_name, (char *)NULL);
1616 "-p", "-f", "--", pw->pw_name, (char *)NULL);
1678 struct passwd *pw = s->pw;
1686 do_setusercontext(pw);
1697 cray_setup(pw->pw_uid, pw->pw_name, command);
1706 session_setup_sia(pw, s->ttyfd == -1 ? NULL : s->tty);
1712 do_nologin(pw);
1713 do_setusercontext(pw);
1736 shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell;
1784 if (k_afs_cell_of_file(pw->pw_dir, cell, sizeof(cell)) == 0)
1789 s->authctxt->krb5_fwd_ccache, NULL, NULL, pw->pw_dir);
1794 if (chdir(pw->pw_dir) < 0) {
1802 "directory %s: %s\n", pw->pw_dir,
1825 setproctitle("%s@%s", s->pw->pw_name, INTERNAL_SFTP_NAME);
1836 exit(sftp_server_main(i, argv, s->pw));
1842 launch_login(pw, hostname);
1982 s->pw = authctxt->pw;
1983 if (s->pw == NULL || !authctxt->valid)
2124 pty_setowner(s->pw, s->tty);
2146 s->pw->pw_name);
2169 "subsystem not found", s->subsys, s->pw->pw_name);
2279 return auth_input_request_forwarding(s->pw);
2362 record_logout(s->pid, s->tty, s->pw->pw_name);
2636 if (s->pw == NULL)
2639 setproctitle("%s@%s", s->pw->pw_name, session_tty_list());
2770 auth_sock_cleanup_proc(authctxt->pw);