summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/port-linux.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2011-02-17 11:49:48 +0000
committerdes <des@FreeBSD.org>2011-02-17 11:49:48 +0000
commita928b356d9f6c1581d3ae4b60a74b64fd68c9ad7 (patch)
tree8db22cf5b81db3b4b8372ef21e8c267113393672 /openbsd-compat/port-linux.c
parente0897658871262068ea4d02fd7aac1c39219296e (diff)
downloadFreeBSD-src-a928b356d9f6c1581d3ae4b60a74b64fd68c9ad7.zip
FreeBSD-src-a928b356d9f6c1581d3ae4b60a74b64fd68c9ad7.tar.gz
Vendor import of OpenSSH 5.8p1
Diffstat (limited to 'openbsd-compat/port-linux.c')
-rw-r--r--openbsd-compat/port-linux.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c
index 5b1cf40..ede533f 100644
--- a/openbsd-compat/port-linux.c
+++ b/openbsd-compat/port-linux.c
@@ -1,4 +1,4 @@
-/* $Id: port-linux.c,v 1.11 2011/01/17 07:50:24 dtucker Exp $ */
+/* $Id: port-linux.c,v 1.11.4.2 2011/02/04 00:43:08 djm Exp $ */
/*
* Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
@@ -205,6 +205,22 @@ ssh_selinux_change_context(const char *newname)
xfree(oldctx);
xfree(newctx);
}
+
+void
+ssh_selinux_setfscreatecon(const char *path)
+{
+ security_context_t context;
+
+ if (!ssh_selinux_enabled())
+ return;
+ if (path == NULL)
+ setfscreatecon(NULL);
+ return;
+ }
+ if (matchpathcon(path, 0700, &context) == 0)
+ setfscreatecon(context);
+}
+
#endif /* WITH_SELINUX */
#ifdef LINUX_OOM_ADJUST
OpenPOWER on IntegriCloud