summaryrefslogtreecommitdiff
path: root/src/shared/selinux-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/selinux-util.c')
-rw-r--r--src/shared/selinux-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c
index a2233e0cfb..7c58985cd2 100644
--- a/src/shared/selinux-util.c
+++ b/src/shared/selinux-util.c
@@ -20,7 +20,6 @@
***/
#include <errno.h>
-#include <unistd.h>
#include <malloc.h>
#include <sys/un.h>
@@ -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;
}
}