summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-11-05 12:36:15 +1100
committerDarren Tucker <dtucker@zip.com.au>2010-11-05 12:36:15 +1100
commit920612e45ae8183226e8841ff27cdc54a8287ba2 (patch)
tree18b9cf0af1c0c470d463b8e03cdd2504f5c3ca2f /session.c
parent97528353c2b4f27169ea9b81e5c4420c734ceea2 (diff)
- (dtucker) [platform.c platform.h session.c] Add a platform hook to run
after the user's groups are established and move the selinux calls into it.
Diffstat (limited to 'session.c')
-rw-r--r--session.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/session.c b/session.c
index ab32bb55f..7994dd60b 100644
--- a/session.c
+++ b/session.c
@@ -1471,11 +1471,6 @@ do_setusercontext(struct passwd *pw)
1471 1471
1472 platform_setusercontext(pw); 1472 platform_setusercontext(pw);
1473 1473
1474#ifdef WITH_SELINUX
1475 /* Cache selinux status for later use */
1476 (void)ssh_selinux_enabled();
1477#endif
1478
1479#ifndef HAVE_CYGWIN 1474#ifndef HAVE_CYGWIN
1480 if (getuid() == 0 || geteuid() == 0) 1475 if (getuid() == 0 || geteuid() == 0)
1481#endif /* HAVE_CYGWIN */ 1476#endif /* HAVE_CYGWIN */
@@ -1554,9 +1549,7 @@ do_setusercontext(struct passwd *pw)
1554 } 1549 }
1555#endif /* HAVE_SETPCRED */ 1550#endif /* HAVE_SETPCRED */
1556 1551
1557#ifdef WITH_SELINUX 1552 platform_setusercontext_post_groups(pw);
1558 ssh_selinux_setup_exec_context(pw->pw_name);
1559#endif
1560 1553
1561 if (options.chroot_directory != NULL && 1554 if (options.chroot_directory != NULL &&
1562 strcasecmp(options.chroot_directory, "none") != 0) { 1555 strcasecmp(options.chroot_directory, "none") != 0) {