matchpathcon_checkmatches(3) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | SEE ALSO | COLOPHON

matchpat...ckmatches(3) SELinux API documentationmatchpat...ckmatches(3)

NAME         top

       matchpathcon_checkmatches, matchpathcon_filespec_add,
       matchpathcon_filespec_destroy, matchpathcon_filespec_eval - check
       and report whether any specification index has no matches with
       any inode. Maintenance and statistics on inode associations

SYNOPSIS         top

       #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         top

       matchpathcon_checkmatches() checks whether any specification has
       no matches and reports them.  The str argument is used as a
       prefix for any warning messages.

       matchpathcon_filespec_add() maintains an association between an
       inode ino and a specification index specind, and checks whether a
       conflicting specification is already associated with the same
       inode (e.g. due to multiple hard links). If so, then it uses the
       latter of the two specifications based on their order in the file
       context configuration. Returns the specification index used or -1
       on error.

       matchpathcon_filespec_destroy() destroys any inode associations
       that have been added, e.g. to restart for a new filesystem.

       matchpathcon_filespec_eval() displays statistics on the hash
       table usage for the inode associations.

RETURN VALUE         top

       Returns zero on success or -1 otherwise.

SEE ALSO         top

       selinux(8), matchpathcon(3), matchpathcon_index(3), freecon(3),
       setfilecon(3), setfscreatecon(3)

COLOPHON         top

       This page is part of the selinux (Security-Enhanced Linux user-
       space libraries and tools) project.  Information about the
       project can be found at 
       ⟨https://github.com/SELinuxProject/selinux/wiki⟩.  If you have a
       bug report for this manual page, see
       ⟨https://github.com/SELinuxProject/selinux/wiki/Contributing⟩.
       This page was obtained from the project's upstream Git repository
       ⟨https://github.com/SELinuxProject/selinux⟩ on 2024-06-14.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2023-05-11.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

sds@tycho.nsa.gov           21 November 2009     matchpat...ckmatches(3)

Pages that refer to this page: matchpathcon(3)