summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2005-06-17 12:44:30 +0000
committerColin Watson <cjwatson@debian.org>2005-06-17 12:44:30 +0000
commit4c2d1c67cea075107aadaa6d81fe456687c69e67 (patch)
tree4f31813c8306491c908948bd75254912385ed651 /session.c
parentbed4bb0fe9380912ecb90e5f918bce8825ec0a38 (diff)
Manoj Srivastava:
- Added SELinux capability, and turned it on be default. Added restorecon calls in preinst and postinst (should not matter if the machine is not SELinux aware). By and large, the changes made should have no effect unless the rules file calls --with-selinux; and even then there should be no performance hit for machines not actively running SELinux. - Modified the preinst and postinst to call restorecon to set the security context for the generated public key files. - Added a comment to /etc/pam.d/ssh to indicate that an SELinux system may want to also include pam_selinux.so.
Diffstat (limited to 'session.c')
-rw-r--r--session.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/session.c b/session.c
index 8ac476c69..bdfcb26f9 100644
--- a/session.c
+++ b/session.c
@@ -58,6 +58,8 @@ RCSID("$OpenBSD: session.c,v 1.181 2004/12/23 17:35:48 markus Exp $");
58#include "session.h" 58#include "session.h"
59#include "monitor_wrap.h" 59#include "monitor_wrap.h"
60 60
61#include "selinux.h"
62
61#if defined(KRB5) && defined(USE_AFS) 63#if defined(KRB5) && defined(USE_AFS)
62#include <kafs.h> 64#include <kafs.h>
63#endif 65#endif
@@ -1342,6 +1344,8 @@ do_setusercontext(struct passwd *pw)
1342#endif 1344#endif
1343 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) 1345 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid)
1344 fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); 1346 fatal("Failed to set uids to %u.", (u_int) pw->pw_uid);
1347
1348 setup_selinux_exec_context(pw->pw_name);
1345} 1349}
1346 1350
1347static void 1351static void