From b8eb586412f338dcee69639ae375d5f72e26a094 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 27 Mar 2008 07:27:20 +1100 Subject: - (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@ --- session.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'session.c') 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 */ -- cgit v1.2.3