chiark / gitweb /
selinux: selabel_lookup_raw can return ENOENT and be a non failure mode.
authorDaniel J Walsh <dwalsh@redhat.com>
Thu, 11 Oct 2012 21:08:47 +0000 (17:08 -0400)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Oct 2012 23:58:42 +0000 (01:58 +0200)
src/shared/label.c

index 2062fc3..d353da5 100644 (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);