1selinux_file_context_cmp(3)SELinux API documentationselinux_file_context_cmp(3)
2
3
4
6 selinux_file_context_cmp, selinux_file_context_verify - comparison of
7 two file contexts.
8
9
11 #include <selinux/selinux.h>
12
13
14 int selinux_file_context_cmp(const security_context_t a, const secu‐
15 rity_context_t b);
16
17 int selinux_file_context_verify(const char *path, mode_t mode);
18
19
21 selinux_file_context_cmp compares two file contexts to see if their
22 differences are "significant", the function runs the strcmp function
23 ignoring the user componant of the file context.
24
25 selinux_file_context_verify compares the file context on disk to the
26 system default.
27
28
29
31 Returns zero on success or -1 otherwise.
32
33
35 selinux(8), selinux_lsetfilecon(3), matchpathcon(3), freecon(3), set‐
36 filecon(3), setfscreatecon(3)
37
38
39
40sds@tycho.nsa.gov 21 November 2009 selinux_file_context_cmp(3)