{"id":3169,"date":"2022-12-20T16:43:41","date_gmt":"2022-12-20T19:43:41","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/semodule-man8\/"},"modified":"2022-12-20T16:43:41","modified_gmt":"2022-12-20T19:43:41","slug":"semodule-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/semodule-man8\/","title":{"rendered":"SEMODULE (man8)"},"content":{"rendered":"<h1 align=\"center\">SEMODULE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#MODES\">MODES<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#EXAMPLE\">EXAMPLE<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHORS\">AUTHORS<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">semodule \u2212 Manage SELinux policy modules.<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>semodule [option]&#8230; MODE&#8230;<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">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.<\/p>\n<h2>MODES <a name=\"MODES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212R, \u2212\u2212reload<\/b><\/p>\n<p style=\"margin-left:22%;\">force a reload of policy<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212B, \u2212\u2212build<\/b><\/p>\n<p style=\"margin-left:22%;\">force a rebuild of policy (also reloads unless \u2212n is used)<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212D, \u2212\u2212disable_dontaudit<\/b><\/p>\n<p style=\"margin-left:22%;\">Temporarily remove dontaudits from policy. Reverts whenever policy is rebuilt<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212i,\u2212\u2212install=MODULE_PKG<\/b><\/p>\n<p style=\"margin-left:22%;\">install\/replace a module package<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212u,\u2212\u2212upgrade=MODULE_PKG<\/b><\/p>\n<p style=\"margin-left:22%;\">deprecated, alias for &#8211;install<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212b,\u2212\u2212base=MODULE_PKG<\/b><\/p>\n<p style=\"margin-left:22%;\">deprecated, alias for &#8211;install<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212r,\u2212\u2212remove=MODULE_NAME<\/b><\/p>\n<p style=\"margin-left:22%;\">remove existing module at desired priority (defaults to -X 400)<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212l[KIND],\u2212\u2212list-modules[=KIND]<\/b><\/p>\n<p style=\"margin-left:22%;\">display list of installed modules (other than base)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"7%\">\n<p><b>KIND:<\/b><\/p>\n<\/td>\n<td width=\"82%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\">standard<\/p>\n<p style=\"margin-left:22%;\">list highest priority, enabled, non-base modules<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"6%\">\n<p>full<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"24%\">\n<p>list all modules<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>\u2212X,\u2212\u2212priority=PRIORITY<\/b><\/p>\n<p style=\"margin-left:22%;\">set priority for following operations (1-999)<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212e,\u2212\u2212enable=MODULE_NAME<\/b><\/p>\n<p style=\"margin-left:22%;\">enable module<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212d,\u2212\u2212disable=MODULE_NAME<\/b><\/p>\n<p style=\"margin-left:22%;\">disable module<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212E,\u2212\u2212extract=MODULE_PKG<\/b><\/p>\n<p style=\"margin-left:22%;\">Extract a module from the store as an HLL or CIL file to the current directory. A module is extracted as HLL by default. The name of the module written is <module-name>.<lang_ext><\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212s,\u2212\u2212store<\/b><\/p>\n<p style=\"margin-left:22%;\">name of the store to operate on<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212n,\u2212\u2212noreload,\u2212N<\/b><\/p>\n<p style=\"margin-left:22%;\">do not reload policy after commit<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212h,\u2212\u2212help<\/b><\/p>\n<p style=\"margin-left:22%;\">prints help message and quit<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212P,\u2212\u2212preserve_tunables<\/b><\/p>\n<p style=\"margin-left:22%;\">Preserve tunables in policy<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212C,\u2212\u2212ignore-module-cache<\/b><\/p>\n<p style=\"margin-left:22%;\">Recompile CIL modules built from HLL files<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212p,\u2212\u2212path<\/b><\/p>\n<p style=\"margin-left:22%;\">Use an alternate path for the policy root<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212S,\u2212\u2212store-path<\/b><\/p>\n<p style=\"margin-left:22%;\">Use an alternate path for the policy store root<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212v,\u2212\u2212verbose<\/b><\/p>\n<p style=\"margin-left:22%;\">be verbose<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212c,\u2212\u2212cil<\/b><\/p>\n<p style=\"margin-left:22%;\">Extract module as a CIL file. This only affects the \u2212\u2212extract option and only modules listed in \u2212\u2212extract after this option.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212H,\u2212\u2212hll<\/b><\/p>\n<p style=\"margin-left:22%;\">Extract module as an HLL file. This only affects the \u2212\u2212extract option and only modules listed in \u2212\u2212extract after this option.<\/p>\n<h2>EXAMPLE <a name=\"EXAMPLE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"># Install or replace a base policy package. <br \/> $ semodule \u2212b base.pp <br \/> # Install or replace a non-base policy package. <br \/> $ semodule \u2212i httpd.pp <br \/> # Install or replace all non-base modules in the current directory. <br \/> # This syntax can be used with -i\/u\/r\/E, but no other option can be entered after the module names <br \/> $ semodule \u2212i *.pp <br \/> # Install or replace all modules in the current directory. <br \/> $ ls *.pp | grep \u2212Ev &#8220;base.pp|enableaudit.pp&#8221; | xargs \/usr\/sbin\/semodule \u2212b base.pp \u2212i <br \/> # List non-base modules. <br \/> $ semodule \u2212l <br \/> # List all modules including priorities <br \/> $ semodule \u2212lfull <br \/> # Remove a module at priority 100 <br \/> $ semodule \u2212X 100 \u2212r wireshark <br \/> # Turn on all AVC Messages for which SELinux currently is &#8220;dontaudit&#8221;ing. <br \/> $ semodule \u2212DB <br \/> # Turn &#8220;dontaudit&#8221; rules back on. <br \/> $ semodule \u2212B <br \/> # Disable a module (all instances of given module across priorities will be disabled). <br \/> $ semodule \u2212d alsa <br \/> # Install a module at a specific priority. <br \/> $ semodule \u2212X 100 \u2212i alsa.pp <br \/> # List all modules. <br \/> $ semodule \u2212\u2212list=full <br \/> # Set an alternate path for the policy root <br \/> $ semodule \u2212B \u2212p &#8220;\/tmp&#8221; <br \/> # Set an alternate path for the policy store root <br \/> $ semodule \u2212B \u2212S &#8220;\/tmp\/var\/lib\/selinux&#8221; <br \/> # Write the HLL version of puppet and the CIL version of wireshark <br \/> # modules at priority 400 to the current working directory <br \/> $ semodule \u2212X 400 \u2212\u2212hll \u2212E puppet \u2212\u2212cil \u2212E wireshark<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>checkmodule<\/b>(8), <b>semodule_package<\/b>(8)<\/p>\n<h2>AUTHORS <a name=\"AUTHORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This manual page was written by Dan Walsh <dwalsh@redhat.com>. <br \/> The program was written by Karl MacMillan <kmacmillan@tresys.com>, Joshua Brindle <jbrindle@tresys.com>, Jason Tang <jtang@tresys.com><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  semodule \u2212 Manage SELinux policy modules. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,312],"class_list":["post-3169","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-semodule"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3169"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3169\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}