summaryrefslogtreecommitdiff
path: root/sshpty.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-04-22 21:26:08 +1000
committerDamien Miller <djm@mindrot.org>2006-04-22 21:26:08 +1000
commit73b42d2bb058da914828b53f2951954560a5b6eb (patch)
tree7271e92211fab0a06b0d36f162801b073220c5bf /sshpty.c
parent2eaf37d899a55c253ad42d13534a824bce9c8ed2 (diff)
downloadopenssh-git-73b42d2bb058da914828b53f2951954560a5b6eb.tar.gz
- (djm) [Makefile.in configure.ac session.c sshpty.c]
[contrib/redhat/sshd.init openbsd-compat/Makefile.in] [openbsd-compat/openbsd-compat.h openbsd-compat/port-linux.c] [openbsd-compat/port-linux.h] Add support for SELinux, setting the execution and TTY contexts. based on patch from Daniel Walsh, bz #880; ok dtucker@
Diffstat (limited to 'sshpty.c')
-rw-r--r--sshpty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sshpty.c b/sshpty.c
index a15df041..0e49e9a1 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -210,6 +210,10 @@ pty_setowner(struct passwd *pw, const char *tty)
fatal("stat(%.100s) failed: %.100s", tty,
strerror(errno));
+#ifdef WITH_SELINUX
+ ssh_selinux_setup_pty(pw->pw_name, tty);
+#endif
+
if (st.st_uid != pw->pw_uid || st.st_gid != gid) {
if (chown(tty, pw->pw_uid, gid) < 0) {
if (errno == EROFS &&