From 71adf127e834e215017b22d61cb4cd4b75cf8ddc Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 25 Jan 2011 12:16:15 +1100 Subject: - (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 --- ssh.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'ssh.c') 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) strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR); if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0) { #ifdef WITH_SELINUX - char *scon; - - matchpathcon(buf, 0700, &scon); - setfscreatecon(scon); + ssh_selinux_setfscreatecon(buf); #endif if (mkdir(buf, 0700) < 0) error("Could not create directory '%.200s'.", buf); #ifdef WITH_SELINUX - setfscreatecon(NULL); + ssh_selinux_setfscreatecon(NULL); #endif } /* load options.identity_files */ -- cgit v1.2.3