diff options
Diffstat (limited to 'crypto/openssh/session.c')
-rw-r--r-- | crypto/openssh/session.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/openssh/session.c b/crypto/openssh/session.c index b04e629..0f00813 100644 --- a/crypto/openssh/session.c +++ b/crypto/openssh/session.c @@ -98,6 +98,10 @@ __RCSID("$FreeBSD$"); #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' || \ @@ -1547,6 +1551,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); |