| 1 |
.TH "matchpathcon" "8" "21 April 2005" "[email protected]" "SELinux Command Line documentation" |
| 2 |
.SH "NAME" |
| 3 |
matchpathcon \- get the default SELinux security context for the specified path from the file contexts configuration |
| 4 |
. |
| 5 |
.SH "SYNOPSIS" |
| 6 |
.B matchpathcon |
| 7 |
.RB [ \-V ] |
| 8 |
.RB [ \-N ] |
| 9 |
.RB [ \-n ] |
| 10 |
.RB [ \-m |
| 11 |
.IR type ] |
| 12 |
.RB [ \-f |
| 13 |
.IR file_contexts_file ] |
| 14 |
.RB [ \-p |
| 15 |
.IR prefix ] |
| 16 |
.RB [ \-P |
| 17 |
.IR policy_root_path ] |
| 18 |
.I filepath... |
| 19 |
. |
| 20 |
.SH "DESCRIPTION" |
| 21 |
.BR matchpathcon |
| 22 |
queries the system policy and outputs the default security context associated with the filepath. |
| 23 |
|
| 24 |
.B Note: |
| 25 |
Identical paths can have different security contexts, depending on the file |
| 26 |
type (regular file, directory, link file, char file ...). |
| 27 |
|
| 28 |
.B matchpathcon |
| 29 |
will also take the file type into consideration in determining the default security context if the file exists. If the file does not exist, no file type matching will occur. |
| 30 |
. |
| 31 |
.SH OPTIONS |
| 32 |
.TP |
| 33 |
.BI \-m " type" |
| 34 |
Force file type for the lookup. |
| 35 |
Valid types are |
| 36 |
.BR file ", " dir ", "pipe ", " chr_file ", " blk_file ", " |
| 37 |
.BR lnk_file ", " sock_file . |
| 38 |
.TP |
| 39 |
.B \-n |
| 40 |
Do not display path. |
| 41 |
.TP |
| 42 |
.B \-N |
| 43 |
Do not use translations. |
| 44 |
.TP |
| 45 |
.BI \-f " file_context_file" |
| 46 |
Use alternate file_context file |
| 47 |
.TP |
| 48 |
.BI \-p " prefix" |
| 49 |
Use prefix to speed translations |
| 50 |
.TP |
| 51 |
.BI \-P " policy_root_path" |
| 52 |
Use alternate policy root path |
| 53 |
.TP |
| 54 |
.B \-V |
| 55 |
Verify file context on disk matches defaults |
| 56 |
. |
| 57 |
.SH AUTHOR |
| 58 |
This manual page was written by Dan Walsh <[email protected]>. |
| 59 |
. |
| 60 |
.SH "SEE ALSO" |
| 61 |
.BR selinux "(8), " |
| 62 |
.BR matchpathcon (3) |