summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2014-01-20 17:59:28 -0800
committerTim Rice <tim@multitalents.net>2014-01-20 17:59:28 -0800
commit9464ba6fb34bb42eb3501ec3c5143662e75674bf (patch)
tree22e065163b64b0eb5ca196f55f3499a3049ca6e9 /session.c
parenta6d573caa14d490e6c42fb991bcb5c6860ec704b (diff)
- (tim) [platform.c session.c] Fix bug affecting SVR5 platforms introduced
with sftp chroot support. Move set_id call after chroot.
Diffstat (limited to 'session.c')
-rw-r--r--session.c5
1 files changed, 5 insertions, 0 deletions
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