logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

set_matchpathcon_flags, set_matchpathcon_invalidcon, set_matchpathcon_printf - set flags controlling the

Description

set_matchpathcon_flags()   sets   the   flags  controlling  the  operation  of  matchpathcon_init(3)  and
       subsequently matchpathcon_index(3) or matchpathcon(3).  If the MATCHPATHCON_BASEONLY flag  is  set,  then
       only  the  base file contexts configuration file will be processed, not any dynamically generated entries
       or local customizations.

       set_matchpathcon_invalidcon() sets the function used by matchpathcon_init(3) when checking  the  validity
       of  a  context  in  the  file  contexts configuration.  If not set, then this defaults to a test based on
       security_check_context(3), which checks validity against the active policy on a SELinux system.  This can
       be set to instead perform checking based on a binary policy file, e.g. using  sepol_check_context(3),  as
       is  done  by setfiles-c.  The function is also responsible for reporting any such error, and may include
       the path and lineno in such error messages.

       set_matchpathcon_printf() sets the function used by matchpathcon_init(3) when displaying errors about the
       file contexts configuration.  If not set, then this defaults to fprintf(stderr, fmt, ...).  This  can  be
       set to redirect error reporting to a different destination.

Name

       set_matchpathcon_flags,  set_matchpathcon_invalidcon, set_matchpathcon_printf - set flags controlling the
       operation of matchpathcon or matchpathcon_index and configure the  behaviour  of  validity  checking  and
       error displaying

Return Value

       Returns zero on success or -1 otherwise.

See Also

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

stephen.smalley.work@gmail.com                  21 November 2009                       set_matchpathcon_flags(3)

Synopsis

#include<selinux/selinux.h>voidset_matchpathcon_flags(unsignedintflags);voidset_matchpathcon_invalidcon(int(*f)(constchar*path,unsignedlineno,char*context));voidset_matchpathcon_printf(void(*f)(constchar*fmt,...));

See Also