diff options
Diffstat (limited to 'security/openssh/files/patch-au')
-rw-r--r-- | security/openssh/files/patch-au | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/security/openssh/files/patch-au b/security/openssh/files/patch-au index 596e74cb551f..abb20c8ac770 100644 --- a/security/openssh/files/patch-au +++ b/security/openssh/files/patch-au @@ -1,5 +1,5 @@ ---- session.c.orig Sun Sep 16 16:46:54 2001 -+++ session.c Wed Oct 3 12:50:00 2001 +--- session.c.orig Fri Mar 8 06:11:56 2002 ++++ session.c Fri Mar 8 06:15:32 2002 @@ -57,6 +57,12 @@ #include "canohost.h" #include "session.h" @@ -13,7 +13,7 @@ /* types */ #define TTYSZ 64 -@@ -392,6 +398,13 @@ +@@ -394,6 +400,13 @@ log_init(__progname, options.log_level, options.log_facility, log_stderr); /* @@ -27,7 +27,7 @@ * Create a new session and process group since the 4.4BSD * setlogin() affects the entire process group. */ -@@ -497,6 +510,14 @@ +@@ -499,6 +512,14 @@ /* Child. Reinitialize the log because the pid has changed. */ log_init(__progname, options.log_level, options.log_facility, log_stderr); @@ -42,7 +42,7 @@ /* Close the master side of the pseudo tty. */ close(ptyfd); -@@ -591,6 +612,11 @@ +@@ -589,6 +610,11 @@ time_t last_login_time; struct passwd * pw = s->pw; pid_t pid = getpid(); @@ -54,7 +54,7 @@ /* * Get IP address of client. If the connection is not a socket, let -@@ -631,6 +657,21 @@ +@@ -629,6 +655,21 @@ printf("Last login: %s from %s\r\n", time_string, hostname); } @@ -76,7 +76,7 @@ do_motd(); } -@@ -857,6 +898,10 @@ +@@ -775,6 +816,10 @@ env[0] = NULL; if (!options.use_login) { @@ -87,7 +87,7 @@ /* Set basic environment. */ child_set_env(&env, &envsize, "USER", pw->pw_name); child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); -@@ -864,6 +909,12 @@ +@@ -782,6 +827,12 @@ #ifdef HAVE_LOGIN_CAP (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH); child_set_env(&env, &envsize, "PATH", getenv("PATH")); @@ -100,7 +100,7 @@ #else child_set_env(&env, &envsize, "PATH", _PATH_STDPATH); #endif -@@ -875,8 +926,13 @@ +@@ -793,8 +844,13 @@ /* Normal systems set SHELL by default. */ child_set_env(&env, &envsize, "SHELL", shell); } @@ -113,8 +113,8 @@ +#endif /* HAVE_LOGIN_CAP */ /* Set custom environment options from RSA authentication. */ - while (custom_environment) { -@@ -968,7 +1024,7 @@ + if (!options.use_login) { +@@ -1057,7 +1113,7 @@ * initgroups, because at least on Solaris 2.3 it leaves file * descriptors open. */ @@ -122,12 +122,14 @@ + for (i = 3; i < getdtablesize(); i++) close(i); - /* Change current directory to the user\'s home directory. */ -@@ -1004,6 +1060,28 @@ - * in this order). - */ - if (!options.use_login) { + /* +@@ -1087,6 +1143,31 @@ + exit(1); + #endif + } ++ +#ifdef __FreeBSD__ ++ if (!options.use_login) { + /* + * If the password change time is set and has passed, give the + * user a password expiry notice and chance to change it. @@ -148,7 +150,8 @@ + } + } + } ++ } +#endif /* __FreeBSD__ */ - /* ignore _PATH_SSH_USER_RC for subsystems */ - if (!s->is_subsystem && (stat(_PATH_SSH_USER_RC, &st) >= 0)) { - snprintf(cmd, sizeof cmd, "%s -c '%s %s'", + + if (!options.use_login) + do_rc_files(s, shell); |