summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shared/selinux-util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c
index 4332c916fa..1eddd17d27 100644
--- a/src/shared/selinux-util.c
+++ b/src/shared/selinux-util.c
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <malloc.h>
#include <sys/un.h>
+
#ifdef HAVE_SELINUX
#include <selinux/selinux.h>
#include <selinux/label.h>
@@ -328,7 +329,7 @@ int mac_selinux_create_file_prepare(const char *path, mode_t mode) {
if (!newpath)
return -ENOMEM;
- r = selabel_lookup_raw(label_hnd, &filecon, newpath, S_IFDIR);
+ r = selabel_lookup_raw(label_hnd, &filecon, newpath, mode);
}
if (r < 0 && errno != ENOENT)