summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--platform.c8
-rw-r--r--session.c5
3 files changed, 8 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ebe5a639..5c26fa9f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
5 -ftrapv (it seems to work but fails when trying to link ssh). ok djm@ 5 -ftrapv (it seems to work but fails when trying to link ssh). ok djm@
6 - (dtucker) [aclocal.m4] Differentiate between compile-time and link-time 6 - (dtucker) [aclocal.m4] Differentiate between compile-time and link-time
7 tests in the configure output. ok djm. 7 tests in the configure output. ok djm.
8 - (tim) [platform.c session.c] Fix bug affecting SVR5 platforms introduced
9 with sftp chroot support. Move set_id call after chroot.
8 10
920140120 1120140120
10 - (dtucker) [gss-serv-krb5.c] Fall back to krb5_cc_gen_new if the Kerberos 12 - (dtucker) [gss-serv-krb5.c] Fall back to krb5_cc_gen_new if the Kerberos
diff --git a/platform.c b/platform.c
index 6d896c229..30fc60909 100644
--- a/platform.c
+++ b/platform.c
@@ -1,4 +1,4 @@
1/* $Id: platform.c,v 1.20 2013/09/22 09:02:40 dtucker Exp $ */ 1/* $Id: platform.c,v 1.21 2014/01/21 01:59:29 tim Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Darren Tucker. All rights reserved. 4 * Copyright (c) 2006 Darren Tucker. All rights reserved.
@@ -164,12 +164,6 @@ platform_setusercontext_post_groups(struct passwd *pw)
164 aix_usrinfo(pw); 164 aix_usrinfo(pw);
165#endif /* _AIX */ 165#endif /* _AIX */
166 166
167#if !defined(HAVE_LOGIN_CAP) && defined(USE_LIBIAF)
168 if (set_id(pw->pw_name) != 0) {
169 exit(1);
170 }
171# endif /* USE_LIBIAF */
172
173#ifdef HAVE_SETPCRED 167#ifdef HAVE_SETPCRED
174 /* 168 /*
175 * If we have a chroot directory, we set all creds except real 169 * If we have a chroot directory, we set all creds except real
diff --git a/session.c b/session.c
index 924c11bcc..6be16ca86 100644
--- a/session.c
+++ b/session.c
@@ -1552,6 +1552,11 @@ do_setusercontext(struct passwd *pw)
1552 */ 1552 */
1553 (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUMASK); 1553 (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUMASK);
1554#else 1554#else
1555# ifdef USE_LIBIAF
1556 if (set_id(pw->pw_name) != 0) {
1557 exit(1);
1558 }
1559# endif /* USE_LIBIAF */
1555 /* Permanently switch to the desired uid. */ 1560 /* Permanently switch to the desired uid. */
1556 permanently_set_uid(pw); 1561 permanently_set_uid(pw);
1557#endif 1562#endif