Lines Matching refs:Session
1 /* $OpenBSD: session.c,v 1.258 2010/11/25 04:10:09 djm Exp $ */
90 #include "session.h"
111 Session *session_new(void);
112 void session_set_fds(Session *, int, int, int, int, int);
113 void session_pty_cleanup(Session *);
114 void session_proctitle(Session *);
115 int session_setup_x11fwd(Session *);
116 int do_exec_pty(Session *, const char *);
117 int do_exec_no_pty(Session *, const char *);
118 int do_exec(Session *, const char *);
119 void do_login(Session *, const char *);
121 static void do_pre_login(Session *s);
123 void do_child(Session *, const char *);
125 int check_quietlogin(Session *, const char *);
130 static int session_pty_req(Session *);
148 static Session *sessions = NULL;
290 * Prepares for an interactive session. This is called after the user has
298 Session *s;
448 do_exec_no_pty(Session *s, const char *command)
456 fatal("do_exec_no_pty: no session");
482 fatal("do_exec_no_pty: no session");
526 * Create a new session and process group since the 4.4BSD
612 /* Enter the interactive session. */
622 * Enter the interactive session. Note: server_loop must be able to
643 Session *s, const char *command)
649 fatal("do_exec_pty: no session");
745 /* Enter interactive session. */
760 do_pre_login(Session *s)
791 do_exec(Session *s, const char *command)
845 do_login(Session *s, const char *command)
923 check_quietlogin(Session *s, const char *command)
1123 do_setup_env(Session *s, const char *shell)
1318 do_rc_files(Session *s, const char *shell)
1534 do_pwchange(Session *s)
1617 do_child(Session *s, const char *command)
1660 * PAM session modules in do_setusercontext may have
1671 debug3("PAM session not opened, exiting");
1840 debug3("%s: session id %d unused", __func__, id);
1843 fatal("%s: insane session id %d (max %d nalloc %d)",
1858 Session *
1861 Session *s, *tmp;
1888 fatal("%s: session %d already used",
1894 debug("session_new: session %d", s->self);
1904 Session *s = &sessions[i];
1906 debug("dump: used %d next_unused %d session %d %p "
1920 Session *s = session_new();
1929 fatal("no user for session %d", s->self);
1930 debug("session_open: session %d: link with channel %d", s->self, chanid);
1935 Session *
1940 Session *s = &sessions[i];
1942 debug("session_by_tty: session %d tty %s", i, tty);
1951 static Session *
1956 Session *s = &sessions[i];
1958 debug("session_by_channel: session %d channel %d",
1968 static Session *
1974 Session *s = &sessions[i];
1980 debug("session_by_x11_channel: session %d "
1991 static Session *
1997 Session *s = &sessions[i];
2007 session_window_change_req(Session *s)
2019 session_pty_req(Session *s)
2059 error("session_pty_req: session %d alloc failed", s->self);
2062 debug("session_pty_req: session %d alloc %s", s->self, s->tty);
2081 session_subsystem_req(Session *s)
2121 session_x11_req(Session *s)
2126 error("session_x11_req: session %d: "
2147 session_shell_req(Session *s)
2154 session_exec_req(Session *s)
2166 session_break_req(Session *s)
2178 session_env_req(Session *s)
2213 session_auth_agent_req(Session *s)
2233 Session *s;
2236 logit("session_input_channel_req: no session %d req %.100s",
2240 debug("session_input_channel_req: session %d req %s", s->self, rtype);
2243 * a session is in LARVAL state until a shell, a command
2273 session_set_fds(Session *s, int fdin, int fdout, int fderr, int ignore_fderr,
2283 fatal("no channel for session %d", s->self);
2295 session_pty_cleanup2(Session *s)
2298 error("session_pty_cleanup: no session");
2304 debug("session_pty_cleanup: session %d release %s", s->self, s->tty);
2323 /* unlink pty from session */
2328 session_pty_cleanup(Session *s)
2373 Session *s;
2381 debug("session_close_single_x11: session %d: "
2411 session_exit_message(Session *s, int status)
2416 fatal("session_exit_message: session %d: no channel %d",
2418 debug("session_exit_message: session %d channel %d pid %ld",
2446 * the channel gets EOF. The session will be then be closed
2462 session_close(Session *s)
2466 debug("session_close: session %d pid %ld", s->self, (long)s->pid);
2495 Session *s = session_by_pid(pid);
2497 debug("session_close_by_pid: no session for pid %ld",
2510 * the session 'child' itself dies
2515 Session *s = session_by_channel(id);
2519 debug("session_close_by_channel: no session for id %d", id);
2527 * delay detach of session, but release pty, since
2537 /* Close any X11 listeners associated with this session */
2550 session_destroy_all(void (*closefunc)(Session *))
2554 Session *s = &sessions[i];
2573 Session *s = &sessions[i];
2593 session_proctitle(Session *s)
2596 error("no user for session %d", s->self);
2602 session_setup_x11fwd(Session *s)