From 39bdfa31f2f00c3357e2a7a5f139abee6d7c7cd3 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 26 Jul 2013 03:34:18 +0200 Subject: shared: split mkdir_*() and mkdir_*_label() from each other Avoid pulling-in selinux for tools which just create directories but not need to fix the selinux label. --- src/shared/label.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shared/label.c') diff --git a/src/shared/label.c b/src/shared/label.c index 1fe4574633..fde39f2259 100644 --- a/src/shared/label.c +++ b/src/shared/label.c @@ -257,14 +257,14 @@ void label_free(const char *label) { #endif } -int label_mkdir(const char *path, mode_t mode, bool apply) { +int label_mkdir(const char *path, mode_t mode) { /* Creates a directory and labels it according to the SELinux policy */ #ifdef HAVE_SELINUX int r; security_context_t fcon = NULL; - if (!apply || !use_selinux() || !label_hnd) + if (!use_selinux() || !label_hnd) goto skipped; if (path_is_absolute(path)) -- cgit v1.2.3-54-g00ecf