selinux/policycoreutils/semodule/semodule.8

119 lines
3.1 KiB
Groff
Raw Normal View History

.TH SEMODULE "8" "Nov 2005" "Security Enhanced Linux" NSA
.SH NAME
semodule \- Manage SELinux policy modules.
.SH SYNOPSIS
.B semodule [options]... MODE [MODES]...
.br
.SH DESCRIPTION
.PP
semodule is the tool used to manage SELinux policy modules,
including installing, upgrading, listing and removing modules.
semodule may also be used to force a rebuild of policy from the
module store and/or to force a reload of policy without performing
any other transaction. semodule acts on module packages created
by semodule_package. Conventionally, these files have a .pp suffix
(policy package), although this is not mandated in any way.
.SH "OPTIONS"
.TP
.B \-R, \-\-reload
force a reload of policy
.TP
.B \-B, \-\-build
force a rebuild of policy (also reloads unless \-n is used)
.TP
.B \-D, \-\-disable_dontaudit
Temporarily remove dontaudits from policy. Reverts whenever policy is rebuilt
.TP
.B \-i,\-\-install=MODULE_PKG
install/replace a module package
.TP
.B \-u,\-\-upgrade=MODULE_PKG
deprecated, alias for --install
.TP
.B \-b,\-\-base=MODULE_PKG
deprecated, alias for --install
.TP
.B \-r,\-\-remove=MODULE_NAME
remove existing module
.TP
semodule: add priority, enabled, and extended listing This updates the semodule tool with the ability to set the priority for commands, to enable/disable modules, and extended module listing options for displaying extra module information (e.g., priority, enabled status, and language extension). [semodule priority] -X --priority set the priority for following operations Notes: * This sets the priority for the following operations. * It can be used any number of times with its effect continuing until the next priority is specified. * The default priority is used if no priority has yet been specified. Impact on current operations: * Install module * Without priority - Install at default priority. * With priority - Install at specified priority. * New warning when overriding (issued by libsemanage). * Upgrade module * Without priority - Upgrade at default priority (current upgrade semantics apply). * With priority - Upgrade at specified priority (current upgrade semantics apply). * New warning when overriding (issued by libsemanage). * Remove module * Without priority - Remove a module at the default if exists. * With priority - Remove at that priority. * New info messages (issued by libsemanage): * If no modules exist at the given priority but do exist at other priorities, give an info message listing the modules and priority. * If a new module at a lower priority will become active print a message. * If the last module with this name is being removed print a message. * Base * The name of base module on install is fixed to "_base" (performed by libsemanage). * Without priority - Install at default priority. * With priority - Install at specified priority. * New warning when overriding (issued by libsemanage). * List modules * See listing changes below. Examples: semodule -i foo.pp semodule -X 500 -i foo.pp [semodule enable/disable] Add enable/disable status: -e --enable enable the module (at all priorities) -d --disable disable the module (at all priorities) Notes: * Base modules are always enabled and cannot have their enabled/disabled status changed. * New error when disabling a base module (from libsemanage). * New warning when enabling a base module (from libsemanage). Impact on current operations: * Install module * If a module with that name is already installed, then the enabled status will remain the same after installing the new module. * New warning when installing a module which will be disabled by existing enabled status (from libsemanage). * Upgrade module * If a module with that name is already installed, then the enabled status will remain the same after installing the new module. * New warning when installing a module which will be disabled by existing enabled status (from libsemanage). * Remove module * When the last module with a given name is removed (no more exist at other priorities) then the enabled status is forgotten. * Base * Base modules are always installed enabled and remain so (can't be disabled). * List modules * See listing changes below. Examples: semodule -e foo semodule -d foo [semodule list] -l --list list modules as if by -lstandard -lstandard --list=standard list name and version of highest priority, enabled, non-base modules sorted alphabetical by name -lfull --list=full list all fields of all modules columnated sorted high priority to low, within priority alphabetical by name Impact on current operations: * List modules * Default listing stays the same. * New long options for 'standard' and 'full'. Examples: semodule -l semodule -lstandard semodule --list=standard alsa 1.7.1 apm 1.9.1 apt 1.5.2 authlogin 2.0.0 avahi 1.10.3 bluetooth 3.1.3 ... semodule -lfull semodule --list=full 600 alsa 1.7.1 disabled pp 400 _base 1.0.0 pp 400 alsa 1.7.1 disabled pp 400 apm 1.9.1 pp 400 apt 1.5.2 pp 400 authlogin 2.0.0 pp ... 100 alsa 1.7.1 disabled pp Signed-off-by: Chad Sellers <csellers@tresys.com>
2009-12-23 23:25:59 +00:00
.B \-l,\-\-list-modules=[KIND]
display list of installed modules (other than base)
.TP
semodule: add priority, enabled, and extended listing This updates the semodule tool with the ability to set the priority for commands, to enable/disable modules, and extended module listing options for displaying extra module information (e.g., priority, enabled status, and language extension). [semodule priority] -X --priority set the priority for following operations Notes: * This sets the priority for the following operations. * It can be used any number of times with its effect continuing until the next priority is specified. * The default priority is used if no priority has yet been specified. Impact on current operations: * Install module * Without priority - Install at default priority. * With priority - Install at specified priority. * New warning when overriding (issued by libsemanage). * Upgrade module * Without priority - Upgrade at default priority (current upgrade semantics apply). * With priority - Upgrade at specified priority (current upgrade semantics apply). * New warning when overriding (issued by libsemanage). * Remove module * Without priority - Remove a module at the default if exists. * With priority - Remove at that priority. * New info messages (issued by libsemanage): * If no modules exist at the given priority but do exist at other priorities, give an info message listing the modules and priority. * If a new module at a lower priority will become active print a message. * If the last module with this name is being removed print a message. * Base * The name of base module on install is fixed to "_base" (performed by libsemanage). * Without priority - Install at default priority. * With priority - Install at specified priority. * New warning when overriding (issued by libsemanage). * List modules * See listing changes below. Examples: semodule -i foo.pp semodule -X 500 -i foo.pp [semodule enable/disable] Add enable/disable status: -e --enable enable the module (at all priorities) -d --disable disable the module (at all priorities) Notes: * Base modules are always enabled and cannot have their enabled/disabled status changed. * New error when disabling a base module (from libsemanage). * New warning when enabling a base module (from libsemanage). Impact on current operations: * Install module * If a module with that name is already installed, then the enabled status will remain the same after installing the new module. * New warning when installing a module which will be disabled by existing enabled status (from libsemanage). * Upgrade module * If a module with that name is already installed, then the enabled status will remain the same after installing the new module. * New warning when installing a module which will be disabled by existing enabled status (from libsemanage). * Remove module * When the last module with a given name is removed (no more exist at other priorities) then the enabled status is forgotten. * Base * Base modules are always installed enabled and remain so (can't be disabled). * List modules * See listing changes below. Examples: semodule -e foo semodule -d foo [semodule list] -l --list list modules as if by -lstandard -lstandard --list=standard list name and version of highest priority, enabled, non-base modules sorted alphabetical by name -lfull --list=full list all fields of all modules columnated sorted high priority to low, within priority alphabetical by name Impact on current operations: * List modules * Default listing stays the same. * New long options for 'standard' and 'full'. Examples: semodule -l semodule -lstandard semodule --list=standard alsa 1.7.1 apm 1.9.1 apt 1.5.2 authlogin 2.0.0 avahi 1.10.3 bluetooth 3.1.3 ... semodule -lfull semodule --list=full 600 alsa 1.7.1 disabled pp 400 _base 1.0.0 pp 400 alsa 1.7.1 disabled pp 400 apm 1.9.1 pp 400 apt 1.5.2 pp 400 authlogin 2.0.0 pp ... 100 alsa 1.7.1 disabled pp Signed-off-by: Chad Sellers <csellers@tresys.com>
2009-12-23 23:25:59 +00:00
.B KIND:
.TP
standard
list highest priority, enabled, non-base modules
.TP
full
list all modules
.TP
.B \-X,\-\-priority=PRIORITY
set priority for following operations (1-999)
.TP
.B \-e,\-\-enabled=MODULE_NAME
enable module
.TP
.B \-d,\-\-disable=MODULE_NAME
disable module
.TP
.B \-s,\-\-store
name of the store to operate on
.TP
.B \-n,\-\-noreload,\-N
do not reload policy after commit
.TP
.B \-h,\-\-help
prints help message and quit
.TP
2013-11-13 15:43:47 +00:00
.B \-P,\-\-preserve_tunables
Preserve tunables in policy
.TP
.B \-C,\-\-ignore-module-cache
Recompile CIL modules built from HLL files
.TP
.B \-p,\-\-path
Use an alternate path for the policy root
.TP
.B \-S,\-\-store-path
Use an alternate path for the policy store root
.TP
.B \-v,\-\-verbose
be verbose
.SH EXAMPLE
.nf
# Install or replace a base policy package.
$ semodule \-b base.pp
# Install or replace a non-base policy package.
$ semodule \-i httpd.pp
# List non-base modules.
$ semodule \-l
# Turn on all AVC Messages for which SELinux currently is "dontaudit"ing.
$ semodule \-DB
# Turn "dontaudit" rules back on.
$ semodule \-B
# Install or replace all non-base modules in the current directory.
$ semodule \-i *.pp
# Install or replace all modules in the current directory.
$ ls *.pp | grep \-Ev "base.pp|enableaudit.pp" | xargs /usr/sbin/semodule \-b base.pp \-i
semodule: add priority, enabled, and extended listing This updates the semodule tool with the ability to set the priority for commands, to enable/disable modules, and extended module listing options for displaying extra module information (e.g., priority, enabled status, and language extension). [semodule priority] -X --priority set the priority for following operations Notes: * This sets the priority for the following operations. * It can be used any number of times with its effect continuing until the next priority is specified. * The default priority is used if no priority has yet been specified. Impact on current operations: * Install module * Without priority - Install at default priority. * With priority - Install at specified priority. * New warning when overriding (issued by libsemanage). * Upgrade module * Without priority - Upgrade at default priority (current upgrade semantics apply). * With priority - Upgrade at specified priority (current upgrade semantics apply). * New warning when overriding (issued by libsemanage). * Remove module * Without priority - Remove a module at the default if exists. * With priority - Remove at that priority. * New info messages (issued by libsemanage): * If no modules exist at the given priority but do exist at other priorities, give an info message listing the modules and priority. * If a new module at a lower priority will become active print a message. * If the last module with this name is being removed print a message. * Base * The name of base module on install is fixed to "_base" (performed by libsemanage). * Without priority - Install at default priority. * With priority - Install at specified priority. * New warning when overriding (issued by libsemanage). * List modules * See listing changes below. Examples: semodule -i foo.pp semodule -X 500 -i foo.pp [semodule enable/disable] Add enable/disable status: -e --enable enable the module (at all priorities) -d --disable disable the module (at all priorities) Notes: * Base modules are always enabled and cannot have their enabled/disabled status changed. * New error when disabling a base module (from libsemanage). * New warning when enabling a base module (from libsemanage). Impact on current operations: * Install module * If a module with that name is already installed, then the enabled status will remain the same after installing the new module. * New warning when installing a module which will be disabled by existing enabled status (from libsemanage). * Upgrade module * If a module with that name is already installed, then the enabled status will remain the same after installing the new module. * New warning when installing a module which will be disabled by existing enabled status (from libsemanage). * Remove module * When the last module with a given name is removed (no more exist at other priorities) then the enabled status is forgotten. * Base * Base modules are always installed enabled and remain so (can't be disabled). * List modules * See listing changes below. Examples: semodule -e foo semodule -d foo [semodule list] -l --list list modules as if by -lstandard -lstandard --list=standard list name and version of highest priority, enabled, non-base modules sorted alphabetical by name -lfull --list=full list all fields of all modules columnated sorted high priority to low, within priority alphabetical by name Impact on current operations: * List modules * Default listing stays the same. * New long options for 'standard' and 'full'. Examples: semodule -l semodule -lstandard semodule --list=standard alsa 1.7.1 apm 1.9.1 apt 1.5.2 authlogin 2.0.0 avahi 1.10.3 bluetooth 3.1.3 ... semodule -lfull semodule --list=full 600 alsa 1.7.1 disabled pp 400 _base 1.0.0 pp 400 alsa 1.7.1 disabled pp 400 apm 1.9.1 pp 400 apt 1.5.2 pp 400 authlogin 2.0.0 pp ... 100 alsa 1.7.1 disabled pp Signed-off-by: Chad Sellers <csellers@tresys.com>
2009-12-23 23:25:59 +00:00
# Disable a module.
$ semodule \-d alsa
# Install a module at a specific priority.
$ semodule \-X 100 \-i alsa.pp
# List all modules.
$ semodule \-l full
# Set an alternate path for the policy root
$ semodule \-B \-p "/tmp"
# Set an alternate path for the policy store root
$ semodule \-B \-S "/tmp/var/lib/selinux"
.fi
.SH SEE ALSO
.B checkmodule(8), semodule_package(8)
.SH AUTHORS
.nf
This manual page was written by Dan Walsh <dwalsh@redhat.com>.
The program was written by Karl MacMillan <kmacmillan@tresys.com>, Joshua Brindle <jbrindle@tresys.com>, Jason Tang <jtang@tresys.com>