diff options
author | Manoj Srivastava <srivasta@debian.org> | 2014-02-09 16:09:49 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2018-08-24 17:49:07 +0100 |
commit | 03979f2e0768e146d179c66f2d2e33afe61c1be3 (patch) | |
tree | 624add62ece0fb72400966a483aa5af060fb0a77 /sshpty.c | |
parent | 84a7a1b1c767056c80add9f0e15c9f9ec23ec94d (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: 2018-08-24
Patch-Name: selinux-role.patch
Diffstat (limited to 'sshpty.c')
-rw-r--r-- | sshpty.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -162,7 +162,7 @@ pty_change_window_size(int ptyfd, u_int row, u_int col, | |||
162 | } | 162 | } |
163 | 163 | ||
164 | void | 164 | void |
165 | pty_setowner(struct passwd *pw, const char *tty) | 165 | pty_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; |
@@ -184,7 +184,7 @@ pty_setowner(struct passwd *pw, const char *tty) | |||
184 | strerror(errno)); | 184 | strerror(errno)); |
185 | 185 | ||
186 | #ifdef WITH_SELINUX | 186 | #ifdef WITH_SELINUX |
187 | ssh_selinux_setup_pty(pw->pw_name, tty); | 187 | ssh_selinux_setup_pty(pw->pw_name, tty, role); |
188 | #endif | 188 | #endif |
189 | 189 | ||
190 | if (st.st_uid != pw->pw_uid || st.st_gid != gid) { | 190 | if (st.st_uid != pw->pw_uid || st.st_gid != gid) { |