2009-07-17 07:06:59 +00:00
|
|
|
diff -up openssh-5.2p1/session.c.sesftp openssh-5.2p1/session.c
|
2009-07-21 08:59:16 +00:00
|
|
|
--- openssh-5.2p1/session.c.sesftp 2009-07-10 20:32:04.348435048 +0200
|
|
|
|
+++ openssh-5.2p1/session.c 2009-07-10 21:10:42.247557847 +0200
|
2009-07-17 07:06:59 +00:00
|
|
|
@@ -58,6 +58,7 @@
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
+#include <selinux/selinux.h>
|
|
|
|
|
|
|
|
#include "openbsd-compat/sys-queue.h"
|
|
|
|
#include "xmalloc.h"
|
2009-07-21 08:59:16 +00:00
|
|
|
@@ -1816,6 +1817,9 @@ do_child(Session *s, const char *command
|
2009-07-17 07:06:59 +00:00
|
|
|
argv[i] = NULL;
|
|
|
|
optind = optreset = 1;
|
|
|
|
__progname = argv[0];
|
2009-07-21 08:59:16 +00:00
|
|
|
+ if (setcon ("unconfined_u:system_r:sftpd_t:s0-s0:c0.c1023") < 0)
|
|
|
|
+ logit("do_child: setcon failed witch %s", strerror (errno));
|
|
|
|
+
|
2009-07-17 07:06:59 +00:00
|
|
|
exit(sftp_server_main(i, argv, s->pw));
|
|
|
|
}
|
|
|
|
|