2008-08-19 19:30:36 +00:00
|
|
|
.TH "matchmediacon" "3" "15 November 2004" "dwalsh@redhat.com" "SELinux API documentation"
|
|
|
|
.SH "NAME"
|
2012-11-13 20:15:34 +00:00
|
|
|
matchmediacon \- get the default SELinux security context for the specified mediatype from the policy
|
|
|
|
.
|
2008-08-19 19:30:36 +00:00
|
|
|
.SH "SYNOPSIS"
|
|
|
|
.B #include <selinux/selinux.h>
|
|
|
|
.sp
|
2014-02-19 14:16:17 +00:00
|
|
|
.BI "int matchmediacon(const char *" media ", char **" con );
|
2012-11-13 20:15:34 +00:00
|
|
|
.
|
2008-08-19 19:30:36 +00:00
|
|
|
.SH "DESCRIPTION"
|
2012-11-13 20:15:34 +00:00
|
|
|
.BR matchmediacon ()
|
|
|
|
matches the specified media type with the media contexts configuration and
|
|
|
|
sets the security context
|
|
|
|
.I con
|
|
|
|
to refer to the resulting context.
|
2008-08-19 19:30:36 +00:00
|
|
|
.sp
|
2012-11-13 20:15:34 +00:00
|
|
|
.B Note:
|
|
|
|
Caller must free returned security context
|
|
|
|
.I con
|
|
|
|
using
|
|
|
|
.BR freecon (3).
|
|
|
|
.
|
2008-08-19 19:30:36 +00:00
|
|
|
.SH "RETURN VALUE"
|
2012-11-13 20:15:34 +00:00
|
|
|
Returns 0 on success or \-1 otherwise.
|
|
|
|
.
|
2008-08-19 19:30:36 +00:00
|
|
|
.SH Files
|
2012-11-13 20:15:34 +00:00
|
|
|
.I /etc/selinux/{POLICYTYPE}/contexts/files/media
|
|
|
|
.
|
2008-08-19 19:30:36 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR selinux "(8), " freecon "(3)
|