X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Flabel.c;h=9a5f79d7aef91d928d448557fc5a55bb15443006;hb=4f5d327a49e1a40ae0a3b8f1855dc90f3c0d953f;hp=2d7d42a40e7338a7f2ceb83266ab1399a5b5d34a;hpb=9eb977db5b89b44f254ab40c1876a76b7d7ea2d0;p=elogind.git diff --git a/src/shared/label.c b/src/shared/label.c index 2d7d42a40..9a5f79d7a 100644 --- a/src/shared/label.c +++ b/src/shared/label.c @@ -90,9 +90,9 @@ int label_init(const char *prefix) { l = after_mallinfo.uordblks > before_mallinfo.uordblks ? after_mallinfo.uordblks - before_mallinfo.uordblks : 0; - log_info("Successfully loaded SELinux database in %s, size on heap is %iK.", - format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp), - (l+1023)/1024); + log_debug("Successfully loaded SELinux database in %s, size on heap is %iK.", + format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp), + (l+1023)/1024); } #endif @@ -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))