Bug 1545218 - make semodule behaviour consistent through all operation if applying to multiple modules
Summary: make semodule behaviour consistent through all operation if applying to multi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-14 12:16 UTC by Dalibor Pospíšil
Modified: 2018-08-08 19:49 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-08-08 19:49:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dalibor Pospíšil 2018-02-14 12:16:45 UTC
Description of problem:
semodule -i, -r, and -u can work with more module at the same time as described in man page synopsis. Options -d and -e does not work this way. This is at first against the documentation and second inconsistent behaviour.

Version-Release number of selected component (if applicable):
policycoreutils-2.7-4.fc27

How reproducible:
100%

Steps to Reproduce:
1. # semodule -d zabbix zarafa

Actual results:
# semodule -d zabbix zarafa
unknown additional arguments:
 zarafa

usage:  semodule [options]... MODE [MODES]...
Manage SELinux policy modules.
MODES:
  -R, --reload              reload policy
  -B, --build               build and reload policy
  -i,--install=MODULE_PKG   install a new module
  -r,--remove=MODULE_NAME   remove existing module
  -l[KIND],--list-modules[=KIND]  display list of installed modules
     KIND:  standard  list highest priority, enabled modules
            full      list all modules
  -X,--priority=PRIORITY    set priority for following operations (1-999)
  -e,--enable=MODULE_NAME   enable module
  -d,--disable=MODULE_NAME  disable module
  -E,--extract=MODULE_NAME  extract module
Other options:
  -s,--store       name of the store to operate on
  -N,-n,--noreload do not reload policy after commit
  -h,--help        print this message and quit
  -v,--verbose     be verbose
  -D,--disable_dontaudit        Remove dontaudits from policy
  -P,--preserve_tunables        Preserve tunables in policy
  -C,--ignore-module-cache      Rebuild CIL modules compiled from HLL files
  -p,--path        use an alternate path for the policy root
  -S,--store-path  use an alternate path for the policy store root
  -c, --cil extract module as cil. This only affects module extraction.
  -H, --hll extract module as hll. This only affects module extraction.


Expected results:
# semodule -d zabbix zarafa

.. both modules are disabled at once

Additional info:
there's a workaround 'semodule -d zabbix -d zarafa' which is not obvious from the documentation

The documentation might be also updated so it says that options -i, -r, -u, -d, and -e can be used multiple times. Regarding to the man page, there is MOD(S) used in synopsis which should be probably MODULE(S).

Comment 2 Fedora End Of Life 2018-02-20 15:31:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.


Note You need to log in before you can comment on or make changes to this bug.