mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-25 15:32:07 +00:00
27 lines
758 B
Groff
27 lines
758 B
Groff
|
.TH "matchmediacon" "3" "15 November 2004" "dwalsh@redhat.com" "SELinux API documentation"
|
||
|
.SH "NAME"
|
||
|
matchmediacon \- get the default SELinux security context for the specified mediatype from the policy.
|
||
|
|
||
|
.SH "SYNOPSIS"
|
||
|
.B #include <selinux/selinux.h>
|
||
|
.sp
|
||
|
.BI "int matchmediacon(const char *" media ", security_context_t *" con);"
|
||
|
|
||
|
|
||
|
.SH "DESCRIPTION"
|
||
|
|
||
|
.B matchmediacon
|
||
|
matches the specified media type with the media contexts configuration and sets the security context "con" to refer to the resulting context.
|
||
|
.sp
|
||
|
|
||
|
.B Note:
|
||
|
Caller must free returned security context "con" using freecon.
|
||
|
.SH "RETURN VALUE"
|
||
|
Returns 0 on success or -1 otherwise.
|
||
|
|
||
|
.SH Files
|
||
|
/etc/selinux/POLICYTYPE/contexts/files/media
|
||
|
|
||
|
.SH "SEE ALSO"
|
||
|
.BR selinux "(8), " freecon "(3)
|