summaryrefslogtreecommitdiff
path: root/sshpty.c
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2014-02-09 16:09:49 +0000
committerColin Watson <cjwatson@debian.org>2020-06-07 10:25:35 +0100
commit8641a3f57e67e087b4500beb9916e06c4d0ba94c (patch)
tree13f2ec3473e6689b2d890f1a529a320a6f3cfa2a /sshpty.c
parent7e3de67f8447064d6963e8299653d8e01baaef1e (diff)
Handle SELinux authorisation roles
Rejected upstream due to discomfort with magic usernames; a better approach will need an SSH protocol change. In the meantime, this came from Debian's SELinux maintainer, so we'll keep it until we have something better. Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1641 Bug-Debian: http://bugs.debian.org/394795 Last-Update: 2020-02-21 Patch-Name: selinux-role.patch
Diffstat (limited to 'sshpty.c')
-rw-r--r--sshpty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshpty.c b/sshpty.c
index bce09e255..308449b37 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -162,7 +162,7 @@ pty_change_window_size(int ptyfd, u_int row, u_int col,
162} 162}
163 163
164void 164void
165pty_setowner(struct passwd *pw, const char *tty) 165pty_setowner(struct passwd *pw, const char *tty, const char *role)
166{ 166{
167 struct group *grp; 167 struct group *grp;
168 gid_t gid; 168 gid_t gid;
@@ -186,7 +186,7 @@ pty_setowner(struct passwd *pw, const char *tty)
186 strerror(errno)); 186 strerror(errno));
187 187
188#ifdef WITH_SELINUX 188#ifdef WITH_SELINUX
189 ssh_selinux_setup_pty(pw->pw_name, tty); 189 ssh_selinux_setup_pty(pw->pw_name, tty, role);
190#endif 190#endif
191 191
192 if (st.st_uid != pw->pw_uid || st.st_gid != gid) { 192 if (st.st_uid != pw->pw_uid || st.st_gid != gid) {