Debian Codegraph @

libselinux/man/man8/sefcontext_compile.8

raw
1 .TH "sefcontext_compile" "8" "12 Aug 2015" "[email protected]" "SELinux Command Line documentation"
2 .SH "NAME"
3 sefcontext_compile \- compile file context regular expression files
4 .
5 .SH "SYNOPSIS"
6 .B sefcontext_compile
7 .RB [ \-o
8 .IR outputfile ]
9 .RB [ \-p
10 .IR policyfile ]
11 .I inputfile
12 .
13 .SH "DESCRIPTION"
14 .B sefcontext_compile
15 is used to compile file context regular expressions into
16 .BR pcre (3)
17 format.
18 .sp
19 The compiled file is used by libselinux file labeling functions.
20 .sp
21 By default
22 .B sefcontext_compile
23 writes the compiled pcre file with the
24 .B .bin
25 suffix appended (e.g. \fIinputfile\fB.bin\fR).
26 .SH OPTIONS
27 .TP
28 .B \-o
29 Specify an
30 .I outputfile
31 that must be a fully qualified file name as the
32 .B .bin
33 suffix is not automatically added.
34 .TP
35 .B \-p
36 Specify a binary
37 .I policyfile
38 that will be used to validate the context entries in the
39 .I inputfile
40 .br
41 If an invalid context is found the pcre formatted file will not be written and
42 an error will be returned.
43
44 .SH "RETURN VALUE"
45 On error -1 is returned. On success 0 is returned.
46
47 .SH "EXAMPLES"
48 .B Example 1:
49 .br
50 sefcontext_compile /etc/selinux/targeted/contexts/files/file_contexts
51 .sp
52 Results in the following file being generated:
53 .RS
54 /etc/selinux/targeted/contexts/files/file_contexts.bin
55 .RE
56 .sp
57 .B Example 2:
58 .br
59 sefcontext_compile -o new_fc.bin /etc/selinux/targeted/contexts/files/file_contexts
60 .sp
61 Results in the following file being generated in the cwd:
62 .RS
63 new_fc.bin
64 .RE
65 .
66 .SH AUTHOR
67 Dan Walsh, <[email protected]>
68 .
69 .SH "SEE ALSO"
70 .BR selinux (8),
71 .BR semanage (8),