Home | History | Annotate | Download | only in openssh

Lines Matching full:session

1 /* $OpenBSD: session.c,v 1.277 2015/01/16 06:40:12 deraadt Exp $ */
93 #include "session.h"
114 Session *session_new(void);
115 void session_set_fds(Session *, int, int, int, int, int);
116 void session_pty_cleanup(Session *);
117 void session_proctitle(Session *);
118 int session_setup_x11fwd(Session *);
119 int do_exec_pty(Session *, const char *);
120 int do_exec_no_pty(Session *, const char *);
121 int do_exec(Session *, const char *);
122 void do_login(Session *, const char *);
124 static void do_pre_login(Session *s);
126 void do_child(Session *, const char *);
128 int check_quietlogin(Session *, const char *);
133 static int session_pty_req(Session *);
151 static Session *sessions = NULL;
277 * Prepares for an interactive session. This is called after the user has
285 Session *s;
435 do_exec_no_pty(Session *s, const char *command)
443 fatal("do_exec_no_pty: no session");
469 fatal("do_exec_no_pty: no session");
513 * Create a new session and process group since the 4.4BSD
599 /* Enter the interactive session. */
609 * Enter the interactive session. Note: server_loop must be able to
630 do_exec_pty(Session *s, const char *command)
636 fatal("do_exec_pty: no session");
732 /* Enter interactive session. */
747 do_pre_login(Session *s)
778 do_exec(Session *s, const char *command)
817 verbose("Starting session: %s%s%s for %s from %.200s port %d",
855 do_login(Session *s, const char *command)
933 check_quietlogin(Session *s, const char *command)
1138 do_setup_env(Session *s, const char *shell)
1335 do_rc_files(Session *s, const char *shell)
1580 do_pwchange(Session *s)
1672 do_child(Session *s, const char *command)
1715 * PAM session modules in do_setusercontext may have
1726 debug3("PAM session not opened, exiting");
1895 debug3("%s: session id %d unused", __func__, id);
1898 fatal("%s: insane session id %d (max %d nalloc %d)",
1913 Session *
1916 Session *s, *tmp;
1943 fatal("%s: session %d already used",
1949 debug("session_new: session %d", s->self);
1959 Session *s = &sessions[i];
1961 debug("dump: used %d next_unused %d session %d %p "
1975 Session *s = session_new();
1984 fatal("no user for session %d", s->self);
1985 debug("session_open: session %d: link with channel %d", s->self, chanid);
1990 Session *
1995 Session *s = &sessions[i];
1997 debug("session_by_tty: session %d tty %s", i, tty);
2006 static Session *
2011 Session *s = &sessions[i];
2013 debug("session_by_channel: session %d channel %d",
2023 static Session *
2029 Session *s = &sessions[i];
2035 debug("session_by_x11_channel: session %d "
2046 static Session *
2052 Session *s = &sessions[i];
2062 session_window_change_req(Session *s)
2074 session_pty_req(Session *s)
2113 error("session_pty_req: session %d alloc failed", s->self);
2116 debug("session_pty_req: session %d alloc %s", s->self, s->tty);
2135 session_subsystem_req(Session *s)
2175 session_x11_req(Session *s)
2180 error("session_x11_req: session %d: "
2201 session_shell_req(Session *s)
2208 session_exec_req(Session *s)
2220 session_break_req(Session *s)
2232 session_env_req(Session *s)
2267 session_auth_agent_req(Session *s)
2287 Session *s;
2290 logit("session_input_channel_req: no session %d req %.100s",
2294 debug("session_input_channel_req: session %d req %s", s->self, rtype);
2297 * a session is in LARVAL state until a shell, a command
2327 session_set_fds(Session *s, int fdin, int fdout, int fderr, int ignore_fderr,
2337 fatal("no channel for session %d", s->self);
2349 session_pty_cleanup2(Session *s)
2352 error("session_pty_cleanup: no session");
2358 debug("session_pty_cleanup: session %d release %s", s->self, s->tty);
2377 /* unlink pty from session */
2382 session_pty_cleanup(Session *s)
2427 Session *s;
2435 debug("session_close_single_x11: session %d: "
2457 session_exit_message(Session *s, int status)
2462 fatal("session_exit_message: session %d: no channel %d",
2464 debug("session_exit_message: session %d channel %d pid %ld",
2492 * the channel gets EOF. The session will be then be closed
2508 session_close(Session *s)
2512 debug("session_close: session %d pid %ld", s->self, (long)s->pid);
2536 Session *s = session_by_pid(pid);
2538 debug("session_close_by_pid: no session for pid %ld",
2551 * the session 'child' itself dies
2556 Session *s = session_by_channel(id);
2560 debug("session_close_by_channel: no session for id %d", id);
2568 * delay detach of session, but release pty, since
2578 /* Close any X11 listeners associated with this session */
2591 session_destroy_all(void (*closefunc)(Session *))
2595 Session *s = &sessions[i];
2614 Session *s = &sessions[i];
2634 session_proctitle(Session *s)
2637 error("no user for session %d", s->self);
2643 session_setup_x11fwd(Session *s)