summaryrefslogtreecommitdiff
path: root/src/shared/label.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/label.c')
-rw-r--r--src/shared/label.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/shared/label.c b/src/shared/label.c
index 3e5ea67469..d912574625 100644
--- a/src/shared/label.c
+++ b/src/shared/label.c
@@ -263,15 +263,14 @@ void label_free(const char *label) {
#endif
}
-int label_mkdir(const char *path, mode_t mode) {
+int label_mkdir(const char *path, mode_t mode, bool apply) {
/* Creates a directory and labels it according to the SELinux policy */
-
#ifdef HAVE_SELINUX
int r;
security_context_t fcon = NULL;
- if (!use_selinux() || !label_hnd)
+ if (!apply || !use_selinux() || !label_hnd)
goto skipped;
if (path_is_absolute(path))