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

This commit is contained in:
Daniel J Walsh 2012-10-11 17:08:47 -04:00 committed by Lennart Poettering
parent a33c48d83c
commit 080ffcb4a1
1 changed files with 1 additions and 1 deletions

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);