summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-03-26 21:27:20 +0100
committerDarren Tucker <dtucker@zip.com.au>2008-03-26 21:27:20 +0100
commitb8eb586412f338dcee69639ae375d5f72e26a094 (patch)
tree01aae213b6980e733522d5c1fa235519aaf82649 /session.c
parent - (djm) [session.c] Relocate incorrectly-placed closefrom() that was causing (diff)
downloadopenssh-b8eb586412f338dcee69639ae375d5f72e26a094.tar.xz
openssh-b8eb586412f338dcee69639ae375d5f72e26a094.zip
- (dtucker) Cache selinux status earlier so we know if it's enabled after a
chroot. Allows ChrootDirectory to work with selinux support compiled in but not enabled. Using it with selinux enabled will require some selinux support inside the chroot. "looks sane" djm@
Diffstat (limited to '')
-rw-r--r--session.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/session.c b/session.c
index 92282f92a..54621a4c0 100644
--- a/session.c
+++ b/session.c
@@ -1345,6 +1345,11 @@ do_setusercontext(struct passwd *pw)
{
char *chroot_path, *tmp;
+#ifdef WITH_SELINUX
+ /* Cache selinux status for later use */
+ (void)ssh_selinux_enabled();
+#endif
+
#ifndef HAVE_CYGWIN
if (getuid() == 0 || geteuid() == 0)
#endif /* HAVE_CYGWIN */