diff options
author | Kay Sievers <kay@vrfy.org> | 2012-05-31 13:17:26 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-05-31 13:17:26 +0200 |
commit | c66e7f04997fb42b778703418097a5023fa17581 (patch) | |
tree | 219307f5b3ec403e90888aba23e1c535314d594d /src/shared/label.c | |
parent | d2e54fae5ca7a0f71b5ac8b356a589ff0a09ea0a (diff) |
mkdir: provide all functions with and without selinux label application
Diffstat (limited to 'src/shared/label.c')
-rw-r--r-- | src/shared/label.c | 5 |
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)) |