Chris PeBenito 473ea7
.TH "matchmediacon" "3" "15 November 2004" "dwalsh@redhat.com" "SE Linux API documentation"
Chris PeBenito 473ea7
.SH "NAME"
Chris PeBenito 473ea7
matchmediacon \- get the default security context for the specified mediatype from the policy.
Chris PeBenito 473ea7
Chris PeBenito 473ea7
.SH "SYNOPSIS"
Chris PeBenito 473ea7
.B #include <selinux/selinux.h>
Chris PeBenito 473ea7
.sp
Chris PeBenito 473ea7
.BI "int matchmediacon(const char *" media ", security_context_t *" con);"
Chris PeBenito 473ea7
.br 
Chris PeBenito 473ea7
Chris PeBenito 473ea7
.SH "DESCRIPTION"
Chris PeBenito 473ea7
.br
Chris PeBenito 473ea7
.B matchmediacon 
Chris PeBenito 473ea7
matches the specified media type with the media contexts configuration and sets the security context "con" to refer to the resulting context. 
Chris PeBenito 473ea7
.sp
Chris PeBenito 473ea7
.br
Chris PeBenito 473ea7
.B Note: 
Chris PeBenito 473ea7
   Caller must free returned security context "con" using freecon.
Chris PeBenito 473ea7
.SH "RETURN VALUE"
Chris PeBenito 473ea7
Returns 0 on success or -1 otherwise.
Chris PeBenito 473ea7
Chris PeBenito 473ea7
.SH Files
Chris PeBenito 473ea7
/etc/selinux/POLICYTYPE/contexts/files/media
Chris PeBenito 473ea7
Chris PeBenito 473ea7
.SH "SEE ALSO"
Chris PeBenito 473ea7
.BR freecon "(3)