X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Flabel.c;h=a8bf6bd4f93982ce46ba83edc28b982d01693def;hb=076a24adf4bfbb9c5aa8167e102c253c7e1c651e;hp=2062fc316c5dc52c4366d7a8868d6362d65820f1;hpb=cad45ba11ec3572296361f53f5852ffb97a97fa3;p=elogind.git diff --git a/src/shared/label.c b/src/shared/label.c index 2062fc316..a8bf6bd4f 100644 --- a/src/shared/label.c +++ b/src/shared/label.c @@ -25,8 +25,12 @@ #include #include #include +#include +#include +#include #include "label.h" +#include "strv.h" #include "util.h" #include "path-util.h" @@ -186,7 +190,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);