void set_matchpathcon_flags(unsigned int flags);
void set_matchpathcon_invalidcon(int (*f)(const char *path, unsigned lineno, char * context));
void set_matchpathcon_printf(void (*f)(const char *fmt, ...));
set_matchpathcon_invalidcon sets the function used by matchpathcon_init 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 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.