X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/c1cb7bae1a56520c8bc58c1753faddacb16ac646..7f24626bd8b952e65394adf5f99bced26251b2ce:/sshpty.c diff --git a/sshpty.c b/sshpty.c index a15df041..5a0d1a7a 100644 --- a/sshpty.c +++ b/sshpty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshpty.c,v 1.19 2006/03/25 13:17:03 djm Exp $ */ +/* $OpenBSD: sshpty.c,v 1.28 2007/09/11 23:49:09 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,18 +14,25 @@ #include "includes.h" -#include #include +#include #include #include +#include +#include +#include #ifdef HAVE_PATHS_H # include #endif +#include +#include +#include #include #ifdef HAVE_UTIL_H # include -#endif /* HAVE_UTIL_H */ +#endif +#include #include "sshpty.h" #include "log.h" @@ -210,6 +217,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 &&