matchpath...eckmatches(3)
π matchpath...eckmatches(3) β SELinux API documentation π
okay bestie, gather round, because this one is the maintenance crew of matchpathcon and it is lowkey iconic. these four functions are all about checking and reporting whether any specification index has no matches with any inode, plus keeping maintenance and statistics on inode associations. no cap. π¦
β¨ SYNOPSIS β¨
#include <selinux/selinux.h>
void matchpathcon_checkmatches(char *str);
int matchpathcon_filespec_add(ino_t ino, int specind, const char *file);
void matchpathcon_filespec_destroy(void);
void matchpathcon_filespec_eval(void);
πΈ DESCRIPTION πΈ
so there's four of them and they each do a lil job, here's the tea:
matchpathcon_checkmatches()β she checks whether any specification has no matches and then reports them. thestrargument? that's the prefix for any warning messages, so your warnings come out looking cute and labelled. πmatchpathcon_filespec_add()β this one maintains an association between an inodeinoand a specification indexspecind, and also checks whether a conflicting specification is already associated with the same inode (think multiple hard links, that's the classic culprit). if there IS a conflict, it uses the latter of the two specifications based on their order in the file context configuration. she returns the specification index used, or-1on error. not me being the whole referee of your inode drama πmatchpathcon_filespec_destroy()β destroys any inode associations that have been added. it's giving "fresh start", e.g. when you wanna restart for a new filesystem. cleanse and reset, periodt. π§matchpathcon_filespec_eval()β displays statistics on the hash table usage for the inode associations. she's the one with the receipts. πβ¨
π RETURN VALUE π
returns zero on success or -1 otherwise. that's it, that's the whole vibe check. π
π«Ά SEE ALSO π«Ά
selinux(8), matchpathcon(3), matchpathcon_index(3), freecon(3), setfilecon(3), setfscreatecon(3)
heads up bestie: this page is part of the SELinux API documentation, and it's matchpath...eckmatches(3) β same title, same manual section, top and bottom. π
okay that's the whole page, slay, go forth and associate your inodes responsibly ππ
sign-off kiss: stephen.smalley.work@gmail.com β 21 November 2009 ππ¦β
π¦ where this page comes from
- alpine 3.24: libselinux-doc 3.10-r1 Β· Public-Domain
- centos-stream 10: libselinux-devel 3.11-3.el10 Β· LicenseRef-Fedora-Public-Domain
- centos-stream 9: libselinux-devel 3.6-5.el9 Β· Public Domain
- centos-stream 9: libselinux-devel 3.6-5.el9 Β· Public Domain
- fedora 43: libselinux-devel 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 43: libselinux-devel 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- nixos 26.05: libselinux 3.10
- nixpkgs unstable: libselinux 3.11
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms