1set_matchpathcon_flags(3)  SELinux API documentation set_matchpathcon_flags(3)
2
3
4

NAME

6       set_matchpathcon_flags,   set_matchpathcon_invalidcon,   set_matchpath‐
7       con_printf - set flags controlling the  operation  of  matchpathcon  or
8       matchpathcon_index and configure the behaviour of validity checking and
9       error displaying.
10
11

SYNOPSIS

13       #include <selinux/selinux.h>
14
15
16       void set_matchpathcon_flags(unsigned int flags);
17
18       void set_matchpathcon_invalidcon(int (*f)(const  char  *path,  unsigned
19       lineno, char * context));
20
21       void set_matchpathcon_printf(void (*f)(const char *fmt, ...));
22
23

DESCRIPTION

25       set_matchpathcon_flags  sets  the  flags  controlling  the operation of
26       matchpathcon_init and subsequently matchpathcon_index or  matchpathcon.
27       If  the MATCHPATHCON_BASEONLY flag is set, then only the base file con‐
28       texts configuration file will be processed, not any dynamically  gener‐
29       ated entries or local customizations.
30
31
32       set_matchpathcon_invalidcon sets the function used by matchpathcon_init
33       when checking the validity of a context in the file contexts configura‐
34       tion.   If  not  set,  then  this  defaults  to  a  test based on secu‐
35       rity_check_context(3), which checks validity against the active  policy
36       on a SELinux system.  This can be set to instead perform checking based
37       on a binary policy file, e.g. using sepol_check_context(3), as is  done
38       by  setfiles  -c.   The  function is also responsible for reporting any
39       such error, and may include the path and lineno in such error messages.
40
41
42       set_matchpathcon_printf sets the  function  used  by  matchpathcon_init
43       when  displaying  errors about the file contexts configuration.  If not
44       set, then this defaults to fprintf(stderr, fmt, ...).  This can be  set
45       to redirect error reporting to a different destination.
46
47
48

RETURN VALUE

50       Returns zero on success or -1 otherwise.
51
52

SEE ALSO

54       selinux(8),   matchpathcon(3),   matchpathcon_index(3),  set_matchpath‐
55       con_invalidcon(3),  set_matchpathcon_printf(3),  freecon(3),   setfile‐
56       con(3), setfscreatecon(3)
57
58
59
60sds@tycho.nsa.gov              21 November 2009      set_matchpathcon_flags(3)
Impressum