2011-03-17 07:18:17 +00:00
|
|
|
diff -up openssh-5.8p1/session.c.sftpcontext openssh-5.8p1/session.c
|
2011-04-05 18:54:12 +00:00
|
|
|
--- openssh-5.8p1/session.c.sftpcontext 2011-04-05 19:46:53.674654050 +0200
|
|
|
|
+++ openssh-5.8p1/session.c 2011-04-05 19:48:32.942658237 +0200
|
|
|
|
@@ -1520,6 +1520,10 @@ do_setusercontext(struct passwd *pw)
|
|
|
|
free(chroot_path);
|
|
|
|
}
|
|
|
|
|
2011-03-17 07:18:17 +00:00
|
|
|
+#ifdef WITH_SELINUX
|
2011-04-05 18:54:12 +00:00
|
|
|
+ ssh_selinux_change_context("sshd_sftpd_t");
|
2011-03-17 07:18:17 +00:00
|
|
|
+#endif
|
2011-04-05 18:54:12 +00:00
|
|
|
+
|
|
|
|
#ifdef HAVE_LOGIN_CAP
|
|
|
|
if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) {
|
|
|
|
perror("unable to set user context (setuser)");
|