diff options
author | Kevin Steves <stevesk@pobox.com> | 2001-07-04 18:23:02 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2001-07-04 18:23:02 +0000 |
commit | 8f63caa1973bb714fd80357b46d57f328e928b14 (patch) | |
tree | 61b4ee1a5b87a9efa40d7186c66d76a41d056eec /session.c | |
parent | 08ccf9d08c44a622166ccae6b80495391d649df0 (diff) | |
download | openssh-git-8f63caa1973bb714fd80357b46d57f328e928b14.tar.gz |
- (stevesk) more sync for session.c
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 70 |
1 files changed, 36 insertions, 34 deletions
@@ -121,20 +121,21 @@ struct Session { /* func */ Session *session_new(void); -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 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 *, const char *); static void do_authenticated1(Authctxt *); static void do_authenticated2(Authctxt *); - + static void session_close(Session *); static int session_pty_req(Session *); @@ -670,30 +671,6 @@ do_exec(Session *s, const char *command) original_command = NULL; } -/* - * Check for quiet login, either .hushlogin or command given. - */ -static int -check_quietlogin(Session *s, const char *command) -{ - char buf[256]; - struct passwd *pw = s->pw; - struct stat st; - - /* Return 1 if .hushlogin exists or a command given. */ - if (command != NULL) - return 1; - snprintf(buf, sizeof(buf), "%.200s/.hushlogin", pw->pw_dir); -#ifdef HAVE_LOGIN_CAP - if (login_getcapbool(lc, "hushlogin", 0) || stat(buf, &st) >= 0) - return 1; -#else - if (stat(buf, &st) >= 0) - return 1; -#endif - return 0; -} - /* administrative, login(1)-like work */ void do_login(Session *s, const char *command) @@ -792,6 +769,31 @@ do_motd(void) } } + +/* + * Check for quiet login, either .hushlogin or command given. + */ +int +check_quietlogin(Session *s, const char *command) +{ + char buf[256]; + struct passwd *pw = s->pw; + struct stat st; + + /* Return 1 if .hushlogin exists or a command given. */ + if (command != NULL) + return 1; + snprintf(buf, sizeof(buf), "%.200s/.hushlogin", pw->pw_dir); +#ifdef HAVE_LOGIN_CAP + if (login_getcapbool(lc, "hushlogin", 0) || stat(buf, &st) >= 0) + return 1; +#else + if (stat(buf, &st) >= 0) + return 1; +#endif + return 0; +} + /* * Sets the value of the given variable in the environment. If the variable * already exists, its value is overriden. |