projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
989fc2c
)
selinux: fix handling of relative paths when setting up create label
author
Lennart Poettering
<lennart@poettering.net>
Thu, 23 Oct 2014 23:15:53 +0000
(
01:15
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 23 Oct 2014 23:15:53 +0000
(
01:15
+0200)
src/shared/selinux-util.c
patch
|
blob
|
history
diff --git
a/src/shared/selinux-util.c
b/src/shared/selinux-util.c
index
4332c91
..
1eddd17
100644
(file)
--- 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)