X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fselinux-util.c;h=7c58985cd26ae29975e4e7fc5458a5e5dd6b12d6;hb=92947a0878c5d129adb37ddbfdef35274ef5c6ae;hp=82c6924e36a85345f48a156f2b21fe3d83b12818;hpb=2eec67acbb00593e414549a7e5b35eb7dd776b1b;p=elogind.git diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c index 82c6924e3..7c58985cd 100644 --- a/src/shared/selinux-util.c +++ b/src/shared/selinux-util.c @@ -116,6 +116,7 @@ void mac_selinux_finish(void) { return; selabel_close(label_hnd); + label_hnd = NULL; #endif } @@ -145,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; } }