Richard Haines | 50640d3 | 2015-08-13 12:09:00 +0100 | [diff] [blame] | 1 | .TH "sefcontext_compile" "8" "12 Aug 2015" "dwalsh@redhat.com" "SELinux Command Line documentation" |
Dan Walsh | 2af2526 | 2013-10-09 14:38:47 -0400 | [diff] [blame] | 2 | .SH "NAME" |
| 3 | sefcontext_compile \- compile file context regular expression files |
| 4 | . |
| 5 | .SH "SYNOPSIS" |
Richard Haines | 3cb6078 | 2015-06-16 14:49:19 +0100 | [diff] [blame] | 6 | .B sefcontext_compile |
| 7 | .RB [ \-o |
| 8 | .IR outputfile ] |
Richard Haines | 50640d3 | 2015-08-13 12:09:00 +0100 | [diff] [blame] | 9 | .RB [ \-p |
| 10 | .IR policyfile ] |
Richard Haines | 3cb6078 | 2015-06-16 14:49:19 +0100 | [diff] [blame] | 11 | .I inputfile |
Dan Walsh | 2af2526 | 2013-10-09 14:38:47 -0400 | [diff] [blame] | 12 | . |
| 13 | .SH "DESCRIPTION" |
Richard Haines | 3cb6078 | 2015-06-16 14:49:19 +0100 | [diff] [blame] | 14 | .B sefcontext_compile |
| 15 | is used to compile file context regular expressions into |
Petr Lautrbach | f86707e | 2016-04-12 16:07:56 +0200 | [diff] [blame] | 16 | .BR pcre (3) |
Richard Haines | 3cb6078 | 2015-06-16 14:49:19 +0100 | [diff] [blame] | 17 | format. |
| 18 | .sp |
| 19 | The compiled file is used by libselinux file labeling functions. |
| 20 | .sp |
| 21 | By default |
| 22 | .B sefcontext_compile |
Petr Lautrbach | f86707e | 2016-04-12 16:07:56 +0200 | [diff] [blame] | 23 | writes the compiled pcre file with the |
Richard Haines | 3cb6078 | 2015-06-16 14:49:19 +0100 | [diff] [blame] | 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. |
Richard Haines | 50640d3 | 2015-08-13 12:09:00 +0100 | [diff] [blame] | 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 | |
Richard Haines | 3cb6078 | 2015-06-16 14:49:19 +0100 | [diff] [blame] | 44 | .SH "RETURN VALUE" |
| 45 | On error -1 is returned. On success 0 is returned. |
Dan Walsh | 2af2526 | 2013-10-09 14:38:47 -0400 | [diff] [blame] | 46 | |
Richard Haines | 3cb6078 | 2015-06-16 14:49:19 +0100 | [diff] [blame] | 47 | .SH "EXAMPLES" |
| 48 | .B Example 1: |
| 49 | .br |
Dan Walsh | 2af2526 | 2013-10-09 14:38:47 -0400 | [diff] [blame] | 50 | sefcontext_compile /etc/selinux/targeted/contexts/files/file_contexts |
Richard Haines | 3cb6078 | 2015-06-16 14:49:19 +0100 | [diff] [blame] | 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 |
Dan Walsh | 2af2526 | 2013-10-09 14:38:47 -0400 | [diff] [blame] | 65 | . |
| 66 | .SH AUTHOR |
| 67 | Dan Walsh, <dwalsh@redhat.com> |
| 68 | . |
| 69 | .SH "SEE ALSO" |
| 70 | .BR selinux (8), |
| 71 | .BR semanage (8), |