selinux: selabel_lookup_raw can return ENOENT and be a non failure mode.

This commit is contained in:
Daniel J Walsh
2012-10-16 01:58:42 +02:00
committed by Lennart Poettering
parent a33c48d83c
commit 080ffcb4a1
+1 -1
View File
@@ -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);