summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2012-10-11 17:08:47 -0400
committerLennart Poettering <lennart@poettering.net>2012-10-16 01:58:42 +0200
commit080ffcb4a124bd77054a3909bbd5f14d62f79b62 (patch)
tree3427f06f594a46f120d79cb72c11e241264218c1 /src
parenta33c48d83c7b3760519081c6d65231743b3bc60e (diff)
selinux: selabel_lookup_raw can return ENOENT and be a non failure mode.
Diffstat (limited to 'src')
-rw-r--r--src/shared/label.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/label.c b/src/shared/label.c
index 2062fc316c..d353da57ec 100644
--- a/src/shared/label.c
+++ b/src/shared/label.c
@@ -186,7 +186,7 @@ int label_context_set(const char *path, mode_t mode) {
return 0;
r = selabel_lookup_raw(label_hnd, &filecon, path, mode);
- if (r < 0)
+ if (r < 0 && errno != ENOENT)
r = -errno;
else if (r == 0) {
r = setfscreatecon(filecon);