diff options
Diffstat (limited to 'sshpty.c')
-rw-r--r-- | sshpty.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -22,6 +22,8 @@ RCSID("$OpenBSD: sshpty.c,v 1.12 2004/06/21 17:36:31 avsm Exp $"); | |||
22 | #include "log.h" | 22 | #include "log.h" |
23 | #include "misc.h" | 23 | #include "misc.h" |
24 | 24 | ||
25 | #include "selinux.h" | ||
26 | |||
25 | #ifdef HAVE_PTY_H | 27 | #ifdef HAVE_PTY_H |
26 | # include <pty.h> | 28 | # include <pty.h> |
27 | #endif | 29 | #endif |
@@ -200,6 +202,8 @@ pty_setowner(struct passwd *pw, const char *tty) | |||
200 | fatal("stat(%.100s) failed: %.100s", tty, | 202 | fatal("stat(%.100s) failed: %.100s", tty, |
201 | strerror(errno)); | 203 | strerror(errno)); |
202 | 204 | ||
205 | setup_selinux_pty(pw->pw_name, tty); | ||
206 | |||
203 | if (st.st_uid != pw->pw_uid || st.st_gid != gid) { | 207 | if (st.st_uid != pw->pw_uid || st.st_gid != gid) { |
204 | if (chown(tty, pw->pw_uid, gid) < 0) { | 208 | if (chown(tty, pw->pw_uid, gid) < 0) { |
205 | if (errno == EROFS && | 209 | if (errno == EROFS && |