chiark / gitweb /
update TODO
[elogind.git] / src / shared / label.c
index e13eba65501ef7f0264a96a9643b217c6aca816c..9a5f79d7aef91d928d448557fc5a55bb15443006 100644 (file)
@@ -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))