X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fselinux-util.c;h=7c58985cd26ae29975e4e7fc5458a5e5dd6b12d6;hb=01c94c5d0aff09b4c0e429d483c8eeba40017071;hp=a2233e0cfb75e5c259fd42131e5930af2fc96841;hpb=9008e1ac925afcdef7b45042c03fa5444f1c52c2;p=elogind.git diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c index a2233e0cf..7c58985cd 100644 --- a/src/shared/selinux-util.c +++ b/src/shared/selinux-util.c @@ -20,7 +20,6 @@ ***/ #include -#include #include #include @@ -117,6 +116,7 @@ void mac_selinux_finish(void) { return; selabel_close(label_hnd); + label_hnd = NULL; #endif } @@ -146,7 +146,7 @@ int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { r = lsetfilecon(path, fcon); /* If the FS doesn't support labels, then exit without warning */ - if (r < 0 && errno == ENOTSUP) + if (r < 0 && errno == EOPNOTSUPP) return 0; } }