LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

semodule

Manage SELinux policy modules

TLDR

List the modules in the active policy
$ sudo semodule --list-modules
copy
List them with their priorities and enabled state
$ sudo semodule --list-modules=full
copy
Install a compiled policy module
$ sudo semodule --install [path/to/module.pp]
copy
Install at a higher priority, overriding the one the distribution ships
$ sudo semodule --priority [400] --install [path/to/module.pp]
copy
Disable a module without removing it
$ sudo semodule --disable [module_name]
copy
Re-enable it
$ sudo semodule --enable [module_name]
copy
Remove a module
$ sudo semodule --remove [module_name]
copy
Make several changes, then reload once at the end
$ sudo semodule --noreload --install [path/to/module.pp]
copy
Rebuild and reload the whole policy
$ sudo semodule --build
copy
Reload the policy as it stands
$ sudo semodule --reload
copy
Turn off dontaudit rules, so silent denials show up in the audit log
$ sudo semodule --disable_dontaudit --build
copy
Extract an installed module back out to a file
$ sudo semodule --extract [module_name]
copy

SYNOPSIS

semodule [options]

DESCRIPTION

semodule manages SELinux policy modules. It installs, removes, enables, and disables modular policy components that extend the base SELinux policy.Policy modules allow customization of SELinux rules without modifying the base policy.

PARAMETERS

-l, --list

List installed modules
-i, --install file
Install policy module (.pp file)
-r, --remove name
Remove module
-e, --enable name
Enable module
-d, --disable name
Disable module
-R, --reload
Force a reload of policy.
-B, --build
Force a rebuild of policy (also reloads unless -n is used).
-X, --priority PRIORITY
Set priority (1-999) for the following operations.
-s, --store NAME
Name of the store to operate on.
-n, --noreload
Do not reload policy after commit.
-D, --disable_dontaudit
Temporarily remove dontaudit rules from policy.
-v, --verbose
Be verbose.

INSTALL

sudo apt install policycoreutils
copy
sudo dnf install policycoreutils
copy
sudo zypper install policycoreutils
copy
nix profile install nixpkgs#policycoreutils
copy

CAVEATS

Module changes require policy reload. Installing incompatible modules may cause policy errors.

HISTORY

Part of policycoreutils, providing modular SELinux policy management.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid