summaryrefslogtreecommitdiff
path: root/platform.c
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2014-02-09 16:09:49 +0000
committerColin Watson <cjwatson@debian.org>2019-06-05 13:11:52 +0100
commit21e3ff3ab4791d3c94bd775da66cde29797fcb36 (patch)
treec218b12d60175ae0572c0236f2390d9e26de5bc9 /platform.c
parent0f9f44654708e4fde2f52c52f717d061b5e458fa (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: 2019-06-05 Patch-Name: selinux-role.patch
Diffstat (limited to 'platform.c')
-rw-r--r--platform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform.c b/platform.c
index 41acc9370..35654ea51 100644
--- a/platform.c
+++ b/platform.c
@@ -142,7 +142,7 @@ platform_setusercontext(struct passwd *pw)
142 * called if sshd is running as root. 142 * called if sshd is running as root.
143 */ 143 */
144void 144void
145platform_setusercontext_post_groups(struct passwd *pw) 145platform_setusercontext_post_groups(struct passwd *pw, const char *role)
146{ 146{
147#if !defined(HAVE_LOGIN_CAP) && defined(USE_PAM) 147#if !defined(HAVE_LOGIN_CAP) && defined(USE_PAM)
148 /* 148 /*
@@ -183,7 +183,7 @@ platform_setusercontext_post_groups(struct passwd *pw)
183 } 183 }
184#endif /* HAVE_SETPCRED */ 184#endif /* HAVE_SETPCRED */
185#ifdef WITH_SELINUX 185#ifdef WITH_SELINUX
186 ssh_selinux_setup_exec_context(pw->pw_name); 186 ssh_selinux_setup_exec_context(pw->pw_name, role);
187#endif 187#endif
188} 188}
189 189