=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/session.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- src/usr.bin/ssh/session.c 2001/06/21 21:08:25 1.93 +++ src/usr.bin/ssh/session.c 2001/06/23 15:12:20 1.94 @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.93 2001/06/21 21:08:25 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.94 2001/06/23 15:12:20 itojun Exp $"); #include "ssh.h" #include "ssh1.h" @@ -85,23 +85,24 @@ /* func */ Session *session_new(void); -void session_set_fds(Session *s, int fdin, int fdout, int fderr); -void session_pty_cleanup(void *session); -int session_pty_req(Session *s); -void session_proctitle(Session *s); -int session_setup_x11fwd(Session *s); -void session_close(Session *s); -void do_exec_pty(Session *s, const char *command); -void do_exec_no_pty(Session *s, const char *command); -void do_exec(Session *s, const char *command); -void do_login(Session *s, const char *command); -void do_child(Session *s, const char *command); +void session_set_fds(Session *, int, int, int); +static void session_pty_cleanup(void *); +void session_proctitle(Session *); +int session_setup_x11fwd(Session *); +void do_exec_pty(Session *, const char *); +void do_exec_no_pty(Session *, const char *); +void do_exec(Session *, const char *); +void do_login(Session *, const char *); +void do_child(Session *, const char *); void do_motd(void); -int check_quietlogin(Session *s, const char *command); +int check_quietlogin(Session *, const char *); -void do_authenticated1(Authctxt *authctxt); -void do_authenticated2(Authctxt *authctxt); +static void do_authenticated1(Authctxt *); +static void do_authenticated2(Authctxt *); +static void session_close(Session *); +static int session_pty_req(Session *); + /* import */ extern ServerOptions options; extern char *__progname; @@ -166,7 +167,7 @@ * terminals are allocated, X11, TCP/IP, and authentication agent forwardings * are requested, etc. */ -void +static void do_authenticated1(Authctxt *authctxt) { Session *s; @@ -624,7 +625,7 @@ * Sets the value of the given variable in the environment. If the variable * already exists, its value is overriden. */ -void +static void child_set_env(char ***envp, u_int *envsizep, const char *name, const char *value) { @@ -665,7 +666,7 @@ * Otherwise, it must consist of empty lines, comments (line starts with '#') * and assignments of the form name=value. No other forms are allowed. */ -void +static void read_environment_file(char ***env, u_int *envsize, const char *filename) { @@ -1110,7 +1111,7 @@ return NULL; } -void +static void session_dump(void) { int i; @@ -1142,7 +1143,7 @@ return 1; } -Session * +static Session * session_by_channel(int id) { int i; @@ -1158,7 +1159,7 @@ return NULL; } -Session * +static Session * session_by_pid(pid_t pid) { int i; @@ -1173,7 +1174,7 @@ return NULL; } -int +static int session_window_change_req(Session *s) { s->col = packet_get_int(); @@ -1185,7 +1186,7 @@ return 1; } -int +static int session_pty_req(Session *s) { u_int len; @@ -1250,7 +1251,7 @@ return 1; } -int +static int session_subsystem_req(Session *s) { u_int len; @@ -1277,7 +1278,7 @@ return success; } -int +static int session_x11_req(Session *s) { int success; @@ -1298,7 +1299,7 @@ return success; } -int +static int session_shell_req(Session *s) { packet_done(); @@ -1306,7 +1307,7 @@ return 1; } -int +static int session_exec_req(Session *s) { u_int len; @@ -1317,7 +1318,7 @@ return 1; } -int +static int session_auth_agent_req(Session *s) { static int called = 0; @@ -1410,7 +1411,7 @@ * Function to perform pty cleanup. Also called if we get aborted abnormally * (e.g., due to a dropped connection). */ -void +static void session_pty_cleanup(void *session) { Session *s = session; @@ -1440,7 +1441,7 @@ error("close(s->ptymaster): %s", strerror(errno)); } -void +static void session_exit_message(Session *s, int status) { Channel *c; @@ -1485,7 +1486,7 @@ s->chanid = -1; } -void +static void session_close(Session *s) { debug("session_close: session %d pid %d", s->self, s->pid); @@ -1546,7 +1547,7 @@ } } -char * +static char * session_tty_list(void) { static char buf[1024]; @@ -1609,7 +1610,7 @@ return 1; } -void +static void do_authenticated2(Authctxt *authctxt) { server_loop2();