diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-10-24 01:15:53 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-10-24 01:15:53 +0200 |
commit | a07e9cfb790f3f5f492f2ff895a9de65e2b00a09 (patch) | |
tree | 94714066b1237cf2aaa2fb2b25e50f799d1eb698 /src/shared/selinux-util.c | |
parent | 989fc2c61cb3c5376bd8bff6b2cfba9e4d740ffc (diff) |
selinux: fix handling of relative paths when setting up create label
Diffstat (limited to 'src/shared/selinux-util.c')
-rw-r--r-- | src/shared/selinux-util.c | 3 |
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) |