X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fselinux-util.c;h=1eddd17d2797ff797254aab1faf43c34f58affb4;hb=592fd144ae313855f48d0ca52a103013b41e5d59;hp=4332c916fa11c248bd7f3bdb85355d4afd9a9f2a;hpb=c34255bdb217c2a1d3ac6348252437ab8be9ca46;p=elogind.git diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c index 4332c916f..1eddd17d2 100644 --- a/src/shared/selinux-util.c +++ b/src/shared/selinux-util.c @@ -23,6 +23,7 @@ #include #include #include + #ifdef HAVE_SELINUX #include #include @@ -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)