diff options
Diffstat (limited to 'security/openssh-portable/files/patch-session.c')
-rw-r--r-- | security/openssh-portable/files/patch-session.c | 56 |
1 files changed, 8 insertions, 48 deletions
diff --git a/security/openssh-portable/files/patch-session.c b/security/openssh-portable/files/patch-session.c index df1ab8e9db9a..7a19c85c4787 100644 --- a/security/openssh-portable/files/patch-session.c +++ b/security/openssh-portable/files/patch-session.c @@ -1,23 +1,6 @@ -r56266 | dinoex | 2002-03-17 14:24:24 -0600 (Sun, 17 Mar 2002) | 4 lines -Changed paths: - M /head/security/hpn-ssh/Makefile - M /head/security/hpn-ssh/files/patch-auth.c - A /head/security/hpn-ssh/files/patch-auth1.c - A /head/security/hpn-ssh/files/patch-auth2.c - M /head/security/hpn-ssh/files/patch-session.c - M /head/security/openssh-portable/Makefile - M /head/security/openssh-portable/files/patch-auth.c - A /head/security/openssh-portable/files/patch-auth1.c - A /head/security/openssh-portable/files/patch-auth2.c - M /head/security/openssh-portable/files/patch-session.c - -Merged patches for HAVE_LOGIN_CAP from stable - -PR: 35904 - ---- session.c.orig 2011-07-21 18:55:33.883559116 +0200 -+++ session.c 2011-07-21 19:02:17.789294035 +0200 -@@ -1125,6 +1143,9 @@ +--- session.c 2013-03-14 19:22:37.000000000 -0500 ++++ session.c 2013-04-12 21:10:44.510757912 -0500 +@@ -1131,6 +1136,9 @@ struct passwd *pw = s->pw; #if !defined (HAVE_LOGIN_CAP) && !defined (HAVE_CYGWIN) char *path = NULL; @@ -27,7 +10,7 @@ PR: 35904 #endif /* Initialize the environment. */ -@@ -1146,6 +1167,9 @@ +@@ -1152,6 +1160,9 @@ } #endif @@ -37,7 +20,7 @@ PR: 35904 #ifdef GSSAPI /* Allow any GSSAPI methods that we've used to alter * the childs environment as they see fit -@@ -1165,11 +1189,22 @@ +@@ -1171,11 +1182,22 @@ child_set_env(&env, &envsize, "LOGIN", pw->pw_name); #endif child_set_env(&env, &envsize, "HOME", pw->pw_dir); @@ -64,7 +47,7 @@ PR: 35904 #else /* HAVE_LOGIN_CAP */ # ifndef HAVE_CYGWIN /* -@@ -1190,15 +1225,9 @@ +@@ -1196,15 +1218,9 @@ # endif /* HAVE_CYGWIN */ #endif /* HAVE_LOGIN_CAP */ @@ -80,35 +63,12 @@ PR: 35904 /* Set custom environment options from RSA authentication. */ if (!options.use_login) { -@@ -1473,9 +1502,9 @@ - platform_setusercontext(pw); - +@@ -1483,7 +1499,7 @@ if (platform_privileged_uidswap()) { #ifdef HAVE_LOGIN_CAP if (setusercontext(lc, pw, pw->pw_uid, - (LOGIN_SETALL & ~(LOGIN_SETPATH|LOGIN_SETUSER))) < 0) { -+ (LOGIN_SETALL & ~(LOGIN_SETPATH|LOGIN_SETUSER|LOGIN_SETENV))) < 0) { ++ (LOGIN_SETALL & ~(LOGIN_SETENV|LOGIN_SETPATH|LOGIN_SETUSER))) < 0) { perror("unable to set user context"); exit(1); } -@@ -1700,6 +1729,10 @@ - */ - environ = env; - -+#ifdef HAVE_LOGIN_CAP -+ r = login_getcapbool(lc, "requirehome", 0); -+ login_close(lc); -+#endif - #if defined(KRB5) && defined(USE_AFS) - /* - * At this point, we check to see if AFS is active and if we have -@@ -1729,9 +1762,6 @@ - /* Change current directory to the user's home directory. */ - if (chdir(pw->pw_dir) < 0) { - /* Suppress missing homedir warning for chroot case */ --#ifdef HAVE_LOGIN_CAP -- r = login_getcapbool(lc, "requirehome", 0); --#endif - if (r || options.chroot_directory == NULL || - strcasecmp(options.chroot_directory, "none") == 0) - fprintf(stderr, "Could not chdir to home " |