1sefcontext_compile(8) SELinux Command Line documentation sefcontext_compile(8)
2
3
4

NAME

6       sefcontext_compile - compile file context regular expression files
7

SYNOPSIS

9       sefcontext_compile [-o outputfile] [-p policyfile] inputfile
10

DESCRIPTION

12       sefcontext_compile  is used to compile file context regular expressions
13       into pcre(3) format.
14
15       The compiled file is used by libselinux file labeling functions.
16
17       By default sefcontext_compile writes the compiled pcre  file  with  the
18       .bin suffix appended (e.g. inputfile.bin).
19

OPTIONS

21       -o     Specify  an  outputfile that must be a fully qualified file name
22              as the .bin suffix is not automatically added.
23
24       -p     Specify a binary policyfile that will be used  to  validate  the
25              context entries in the inputfile
26              If  an invalid context is found the pcre formatted file will not
27              be written and an error will be returned.
28
29

RETURN VALUE

31       On error -1 is returned.  On success 0 is returned.
32
33

EXAMPLES

35       Example 1:
36       sefcontext_compile /etc/selinux/targeted/contexts/files/file_contexts
37
38       Results in the following file being generated:
39              /etc/selinux/targeted/contexts/files/file_contexts.bin
40
41       Example 2:
42       sefcontext_compile     -o     new_fc.bin     /etc/selinux/targeted/con‐
43       texts/files/file_contexts
44
45       Results in the following file being generated in the cwd:
46              new_fc.bin
47

AUTHOR

49       Dan Walsh, <dwalsh@redhat.com>
50

SEE ALSO

52       selinux(8), semanage(8),
53
54
55
56dwalsh@redhat.com                 12 Aug 2015            sefcontext_compile(8)
Impressum