| 1 |
.TH "matchmediacon" "3" "15 November 2004" "[email protected]" "SELinux API documentation" |
| 2 |
.SH "NAME" |
| 3 |
matchmediacon \- get the default SELinux security context for the specified mediatype from the policy |
| 4 |
. |
| 5 |
.SH "SYNOPSIS" |
| 6 |
.B #include <selinux/selinux.h> |
| 7 |
.sp |
| 8 |
.BI "int matchmediacon(const char *" media ", char **" con ); |
| 9 |
. |
| 10 |
.SH "DESCRIPTION" |
| 11 |
.BR matchmediacon () |
| 12 |
matches the specified media type with the media contexts configuration and |
| 13 |
sets the security context |
| 14 |
.I con |
| 15 |
to refer to the resulting context. |
| 16 |
.sp |
| 17 |
.B Note: |
| 18 |
Caller must free returned security context |
| 19 |
.I con |
| 20 |
using |
| 21 |
.BR freecon (3). |
| 22 |
. |
| 23 |
.SH "RETURN VALUE" |
| 24 |
Returns 0 on success or \-1 otherwise. |
| 25 |
. |
| 26 |
.SH Files |
| 27 |
.I /etc/selinux/{POLICYTYPE}/contexts/files/media |
| 28 |
. |
| 29 |
.SH "SEE ALSO" |
| 30 |
.BR selinux "(8), " freecon "(3) |