1matchpathcon_checkmatches(3)SELinux API documentatiomnatchpathcon_checkmatches(3)
2
3
4
6 matchpathcon_checkmatches, matchpathcon_filespec_add, matchpath‐
7 con_filespec_destroy, matchpathcon_filespec_eval - check and report
8 whether any specification index has no matches with any inode. Mainte‐
9 nance and statistics on inode associations.
10
11
13 #include <selinux/selinux.h>
14
15
16 void matchpathcon_checkmatches(char *str);
17
18
19 int matchpathcon_filespec_add(ino_t ino, int specind, const char
20 *file);
21
22 void matchpathcon_filespec_destroy(void);
23
24 void matchpathcon_filespec_eval(void);
25
26
28 matchpathcon_checkmatches checks whether any specification has no
29 matches and reports them. The str argument is used as a prefix for any
30 warning messages.
31
32
33 matchpathcon_filespec_add maintains an association between an inode ino
34 and a specification index specind, and checks whether a conflicting
35 specification is already associated with the same inode (e.g. due to
36 multiple hard links). If so, then it uses the latter of the two speci‐
37 fications based on their order in the file context configuration.
38 Returns the specification index used or -1 on error.
39
40
41 matchpathcon_filespec_destroy destroys any inode associations that have
42 been added, e.g. to restart for a new filesystem.
43
44
45 matchpathcon_filespec_eval displays statistics on the hash table usage
46 for the inode associations.
47
48
49
51 Returns zero on success or -1 otherwise.
52
53
55 selinux(8), matchpathcon(3), matchpathcon_index(3), freecon(3), set‐
56 filecon(3), setfscreatecon(3)
57
58
59
60sds@tycho.nsa.gov 21 November 2009 matchpathcon_checkmatches(3)