NAME |SYNOPSIS |Record API Overview |Properties API Overview |Record Store API Overview |COLOPHON | |
semanage_fcontext(3) Libsemanage API documentationsemanage_fcontext(3)semanage_fcontext - SELinux File Context Management API
#include <semanage/fcontext_record.h>#include <semanage/fcontexts_policy.h>#include <semanage/fcontexts_local.h> This object contains properties associated with a SELinux file context specification For details on a specific function, see its manual page.
semanage_fcontext_create(3)- create a file context specsemanage_fcontext_free(3)- release resources for this file context specsemanage_fcontext_key_create(3)- create a key, which can be used to identify a file context specsemanage_fcontext_key_free(3)- release resources for this file context spec keysemanage_fcontext_key_extract(3)- create a key matching this file context specsemanage_fcontext_clone(3)- create an identical file context spec (deep-copy clone)semanage_fcontext_compare(3)- compare this file context spec to the provided keysemanage_fcontext_compare2(3)- compare this file context spec to another
semanage_fcontext_get_expr(3)- return the regular expression for this file context specsemanage_fcontext_set_expr(3)- set the regular expression for this file context specsemanage_fcontext_get_type(3)- return the file type for this file context specsemanage_fcontext_get_type_str(3)- return a string representation for this file context spec typesemanage_fcontext_set_type(3)- set the file type for this file context specsemanage_fcontext_get_con(3)- return the SELinux context for this file context specsemanage_fcontext_set_expr(3)- set the SELinux context for this file context spec
semanage_fcontext_modify_local(3)- add or update a file context spec in the local storesemanage_fcontext_del_local(3)- delete a file context spec from the local storesemanage_fcontext_exists(3)- check if a file context spec is defined in the persistent policysemanage_fcontext_exists_local(3)- check if a file context spec is defined in the local storesemanage_fcontext_query(3)- query a file context spec in the persistent policysemanage_fcontext_query_local(3)- query a file context spec in the local storesemanage_fcontext_count(3)- count the number of file context specs defined in the persistent policysemanage_fcontext_count_local(3)- count the number of file context specs defined in the local storesemanage_fcontext_iterate(3)- execute a callback for each file context spec in the persistent policysemanage_fcontext_iterate_local(3)- execute a callback for each file context spec in the local storesemanage_fcontext_list(3)- return an array containing all file context specs in the persistent policysemanage_fcontext_list_local(3)- return an array containing all file context specs in the local store
This page is part of theselinux (Security-Enhanced Linux user- space libraries and tools) project. Information about the project can be found at ⟨https://github.com/SELinuxProject/selinux/wiki⟩. If you have a bug report for this manual page, see ⟨https://github.com/SELinuxProject/selinux/wiki/Contributing⟩. This page was obtained from the project's upstream Git repository ⟨https://github.com/SELinuxProject/selinux⟩ on 2025-08-11. (At that time, the date of the most recent commit that was found in the repository was 2025-08-04.) If you discover any rendering problems in this HTML version of the page, or you believe there is a better or more up-to-date source for the page, or you have corrections or improvements to the information in this COLOPHON (which isnot part of the original manual page), send a mail to man-pages@man7.orgivg2@cornell.edu 16 March 2006semanage_fcontext(3)HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface. For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere. Hosting byjambit GmbH. | ![]() |