summaryrefslogtreecommitdiff
path: root/openbsd-compat/port-linux.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 /openbsd-compat/port-linux.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 'openbsd-compat/port-linux.c')
-rw-r--r--openbsd-compat/port-linux.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c
index 5b1cf402c..b152efc29 100644
--- a/openbsd-compat/port-linux.c
+++ b/openbsd-compat/port-linux.c
@@ -1,4 +1,4 @@
1/* $Id: port-linux.c,v 1.11 2011/01/17 07:50:24 dtucker Exp $ */ 1/* $Id: port-linux.c,v 1.12 2011/01/25 01:16:18 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com> 4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
@@ -205,6 +205,20 @@ ssh_selinux_change_context(const char *newname)
205 xfree(oldctx); 205 xfree(oldctx);
206 xfree(newctx); 206 xfree(newctx);
207} 207}
208
209void
210ssh_selinux_setfscreatecon(const char *path)
211{
212 security_context_t context;
213
214 if (path == NULL) {
215 setfscreatecon(NULL);
216 return;
217 }
218 matchpathcon(path, 0700, &context);
219 setfscreatecon(context);
220}
221
208#endif /* WITH_SELINUX */ 222#endif /* WITH_SELINUX */
209 223
210#ifdef LINUX_OOM_ADJUST 224#ifdef LINUX_OOM_ADJUST