mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-07 05:11:45 +00:00
d4048fa522
This provides the functions for enabling/disabling modules via a semanage_module_key_t and getting/setting module info. Enabled/disabled status is indicated by the presence of an empty file in the disabled directory: /var/lib/selinux/<policy type>/disabled/<module name> The presence of a file there indicates that the module is disabled at all priorities. Enable/disabling of modules is done across all priorities simultaneously to avoid confusion that would likely arise from per priority settings. semanage_module_get_module_info gathers up the on disk information about a module indicated by the module key and puts the information into module info. In order to facilitate an easy mechanism for getting the highest priority module of a given name, the key's priority value may be 0 and the highest priority module with the given name will be located. semanage_direct_set_module_info is a helper function that writes module info to disk. The unused attribute is used to suppress warnings for compilation and is removed in the module install patch later in the series. semanage_module_list_all behaves similar to semanage_module_list except it returns all modules at all priorities. semanage_module_list will only include the highest priority, enabled, non-base modules (this is its current behavior). See the module install patch later in the series for the modified semanage_module_list. Adds a helper function for creating a directory if it doesn't already exist (used to automatically create the disabled, priority, and module dirs). Signed-off-by: Chad Sellers <csellers@tresys.com> |
||
---|---|---|
checkpolicy | ||
libselinux | ||
libsemanage | ||
libsepol | ||
policycoreutils | ||
scripts | ||
sepolgen | ||
.gitignore | ||
Makefile | ||
README |
To build and install everything under a private directory, run: make DESTDIR=~/obj install install-pywrap To install as the default system libraries and binaries (overwriting any previously installed ones - dangerous!), on x86_64, run: make LIBDIR=/usr/lib64 SHLIBDIR=/lib64 install install-pywrap relabel or on x86 (32-bit), run: make install install-pywrap relabel This may render your system unusable if the upstream SELinux userspace lacks library functions or other dependencies relied upon by your distribution. If it breaks, you get to keep both pieces.