Debian Codegraph @

policycoreutils/semodule/semodule.8

raw
1 .TH SEMODULE "8" "Nov 2005" "Security Enhanced Linux" NSA
2 .SH NAME
3 semodule \- Manage SELinux policy modules.
4
5 .SH SYNOPSIS
6 .B semodule [option]... MODE...
7 .br
8 .SH DESCRIPTION
9 .PP
10 semodule is the tool used to manage SELinux policy modules,
11 including installing, upgrading, listing and removing modules.
12 semodule may also be used to force a rebuild of policy from the
13 module store and/or to force a reload of policy without performing
14 any other transaction. semodule acts on module packages created
15 by semodule_package. Conventionally, these files have a .pp suffix
16 (policy package), although this is not mandated in any way.
17
18 .SH "MODES"
19 .TP
20 .B \-R, \-\-reload
21 force a reload of policy
22 .TP
23 .B \-B, \-\-build
24 force a rebuild of policy (also reloads unless \-n is used)
25 .TP
26 .B \-D, \-\-disable_dontaudit
27 Temporarily remove dontaudits from policy. Reverts whenever policy is rebuilt
28 .TP
29 .B \-i,\-\-install=MODULE_PKG
30 install/replace a module package
31 .TP
32 .B \-u,\-\-upgrade=MODULE_PKG
33 deprecated, alias for --install
34 .TP
35 .B \-b,\-\-base=MODULE_PKG
36 deprecated, alias for --install
37 .TP
38 .B \-r,\-\-remove=MODULE_NAME
39 remove existing module at desired priority (defaults to -X 400)
40 .TP
41 .B \-l[KIND],\-\-list-modules[=KIND]
42 display list of installed modules (other than base)
43 .TP
44 .B KIND:
45 .TP
46 standard
47 list highest priority, enabled, non-base modules
48 .TP
49 full
50 list all modules
51 .TP
52 .B \-X,\-\-priority=PRIORITY
53 set priority for following operations (1-999)
54 .TP
55 .B \-e,\-\-enable=MODULE_NAME
56 enable module
57 .TP
58 .B \-d,\-\-disable=MODULE_NAME
59 disable module
60 .TP
61 .B \-E,\-\-extract=MODULE_PKG
62 Extract a module from the store as an HLL or CIL file to the current directory.
63 A module is extracted as HLL by default. The name of the module written is
64 <module-name>.<lang_ext>
65 .SH "OPTIONS"
66 .TP
67 .B \-s,\-\-store
68 name of the store to operate on
69 .TP
70 .B \-n,\-\-noreload,\-N
71 do not reload policy after commit
72 .TP
73 .B \-h,\-\-help
74 prints help message and quit
75 .TP
76 .B \-P,\-\-preserve_tunables
77 Preserve tunables in policy
78 .TP
79 .B \-C,\-\-ignore-module-cache
80 Recompile CIL modules built from HLL files
81 .TP
82 .B \-p,\-\-path
83 Use an alternate path for the policy root
84 .TP
85 .B \-S,\-\-store-path
86 Use an alternate path for the policy store root
87 .TP
88 .B \-v,\-\-verbose
89 be verbose
90 .TP
91 .B \-c,\-\-cil
92 Extract module as a CIL file. This only affects the \-\-extract option and
93 only modules listed in \-\-extract after this option.
94 .TP
95 .B \-H,\-\-hll
96 Extract module as an HLL file. This only affects the \-\-extract option and
97 only modules listed in \-\-extract after this option.
98
99 .SH EXAMPLE
100 .nf
101 # Install or replace a base policy package.
102 $ semodule \-b base.pp
103 # Install or replace a non-base policy package.
104 $ semodule \-i httpd.pp
105 # Install or replace all non-base modules in the current directory.
106 # This syntax can be used with -i/u/r/E, but no other option can be entered after the module names
107 $ semodule \-i *.pp
108 # Install or replace all modules in the current directory.
109 $ ls *.pp | grep \-Ev "base.pp|enableaudit.pp" | xargs /usr/sbin/semodule \-b base.pp \-i
110 # List non-base modules.
111 $ semodule \-l
112 # List all modules including priorities
113 $ semodule \-lfull
114 # Remove a module at priority 100
115 $ semodule \-X 100 \-r wireshark
116 # Turn on all AVC Messages for which SELinux currently is "dontaudit"ing.
117 $ semodule \-DB
118 # Turn "dontaudit" rules back on.
119 $ semodule \-B
120 # Disable a module (all instances of given module across priorities will be disabled).
121 $ semodule \-d alsa
122 # Install a module at a specific priority.
123 $ semodule \-X 100 \-i alsa.pp
124 # List all modules.
125 $ semodule \-\-list=full
126 # Set an alternate path for the policy root
127 $ semodule \-B \-p "/tmp"
128 # Set an alternate path for the policy store root
129 $ semodule \-B \-S "/tmp/var/lib/selinux"
130 # Write the HLL version of puppet and the CIL version of wireshark
131 # modules at priority 400 to the current working directory
132 $ semodule \-X 400 \-\-hll \-E puppet \-\-cil \-E wireshark
133 .fi
134
135 .SH SEE ALSO
136 .BR checkmodule (8),
137 .BR semodule_package (8)
138 .SH AUTHORS
139 .nf
140 This manual page was written by Dan Walsh <[email protected]>.
141 The program was written by Karl MacMillan <[email protected]>, Joshua Brindle <[email protected]>, Jason Tang <[email protected]>