summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2011-09-28 08:14:41 +0000
committerdes <des@FreeBSD.org>2011-09-28 08:14:41 +0000
commit635e938ca4bf2a930571866d1a37d7dabbe43ab7 (patch)
tree779b14ae51eee4ed5bde82d3600b03a260319632 /session.c
parente72431e08d02b2fe4213b401746a9fbd2a984216 (diff)
downloadFreeBSD-src-635e938ca4bf2a930571866d1a37d7dabbe43ab7.zip
FreeBSD-src-635e938ca4bf2a930571866d1a37d7dabbe43ab7.tar.gz
Vendor import of OpenSSH 5.9p1
Diffstat (limited to 'session.c')
-rw-r--r--session.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/session.c b/session.c
index fff31b0..6a70400 100644
--- a/session.c
+++ b/session.c
@@ -96,6 +96,10 @@
#include <kafs.h>
#endif
+#ifdef WITH_SELINUX
+#include <selinux/selinux.h>
+#endif
+
#define IS_INTERNAL_SFTP(c) \
(!strncmp(c, INTERNAL_SFTP_NAME, sizeof(INTERNAL_SFTP_NAME) - 1) && \
(c[sizeof(INTERNAL_SFTP_NAME) - 1] == '\0' || \
@@ -1531,6 +1535,9 @@ do_pwchange(Session *s)
if (s->ttyfd != -1) {
fprintf(stderr,
"You must change your password now and login again!\n");
+#ifdef WITH_SELINUX
+ setexeccon(NULL);
+#endif
#ifdef PASSWD_NEEDS_USERNAME
execl(_PATH_PASSWD_PROG, "passwd", s->pw->pw_name,
(char *)NULL);
OpenPOWER on IntegriCloud