From 9464ba6fb34bb42eb3501ec3c5143662e75674bf Mon Sep 17 00:00:00 2001 From: Tim Rice Date: Mon, 20 Jan 2014 17:59:28 -0800 Subject: - (tim) [platform.c session.c] Fix bug affecting SVR5 platforms introduced with sftp chroot support. Move set_id call after chroot. --- session.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'session.c') 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) */ (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUMASK); #else +# ifdef USE_LIBIAF + if (set_id(pw->pw_name) != 0) { + exit(1); + } +# endif /* USE_LIBIAF */ /* Permanently switch to the desired uid. */ permanently_set_uid(pw); #endif -- cgit v1.2.3