summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2011-01-25 12:16:15 +1100
committerDamien Miller <djm@mindrot.org>2011-01-25 12:16:15 +1100
commit71adf127e834e215017b22d61cb4cd4b75cf8ddc (patch)
tree0f547a038e6d9f1279a4ffc5d2bb40676a709d15 /ssh.c
parent6f8f04b860765da07938bfe1fef017b00c3a3d55 (diff)
- (djm) [configure.ac Makefile.in ssh.c openbsd-compat/port-linux.c
openbsd-compat/port-linux.h] Move SELinux-specific code from ssh.c to port-linux.c to avoid compilation errors. Add -lselinux to ssh when building with SELinux support to avoid linking failure; report from amk AT spamfence.net; ok dtucker
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ssh.c b/ssh.c
index 9409fa713..d32ef78b0 100644
--- a/ssh.c
+++ b/ssh.c
@@ -852,15 +852,12 @@ main(int ac, char **av)
852 strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR); 852 strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR);
853 if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0) { 853 if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0) {
854#ifdef WITH_SELINUX 854#ifdef WITH_SELINUX
855 char *scon; 855 ssh_selinux_setfscreatecon(buf);
856
857 matchpathcon(buf, 0700, &scon);
858 setfscreatecon(scon);
859#endif 856#endif
860 if (mkdir(buf, 0700) < 0) 857 if (mkdir(buf, 0700) < 0)
861 error("Could not create directory '%.200s'.", buf); 858 error("Could not create directory '%.200s'.", buf);
862#ifdef WITH_SELINUX 859#ifdef WITH_SELINUX
863 setfscreatecon(NULL); 860 ssh_selinux_setfscreatecon(NULL);
864#endif 861#endif
865 } 862 }
866 /* load options.identity_files */ 863 /* load options.identity_files */