Bug 1311922 - module name and version defined by policy_module is being ignored with CIL [NEEDINFO]
module name and version defined by policy_module is being ignored with CIL
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: 1281852
  Show dependency treegraph
Reported: 2016-02-25 05:43 EST by Miroslav Vadkerti
Modified: 2017-01-02 09:21 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1345825 (view as bug list)
Last Closed: 2016-12-20 14:01:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mvadkert: needinfo? (mgrepl)

Attachments (Terms of Use)

  None (edit)
Description Miroslav Vadkerti 2016-02-25 05:43:14 EST
Description of problem:
In Fedora 23 the policy_module declaration is ignored and the policy module name
is taken from the module filename. This can cause confusion for the users in
some cases (same policy module declared in different files).

# cat test_noaccess.te
policy_module(policy_tools_test, 1.0)

# make -f /usr/share/selinux/devel/Makefile
Compiling mls test_noaccess module
/usr/bin/checkmodule:  loading policy configuration from tmp/test_noaccess.tmp
/usr/bin/checkmodule:  policy configuration loaded
/usr/bin/checkmodule:  writing binary representation (version 17) to
Creating mls test_noaccess.pp policy package
rm tmp/test_noaccess.mod.fc tmp/test_noaccess.mod

# semodule -i test_noaccess.pp | grep noaccess

If the policy_module is now being ignored, the policy module
conversion should warn about that OR the policy module name should be used for creating.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a test module in filename test.te with policy_module(policy_tools_test, 1.0)
2. make -f /usr/share/selinux/devel/Makefile
3. semodule -i test.pp
4. semodule -l

Actual results:
No warning about policy_module being ignored and semodule shows test as module

Expected results:
Warning about policy_module being ignored OR semodule shows policy_tools_test as module

Additional info:
Comment 1 Dalibor Pospíšil 2016-05-06 05:03:34 EDT
I would say that absence of version can cause problem at customer side in production systems. I think traceability is important and many customers will complain about that.
Comment 2 Miroslav Grepl 2016-05-09 02:29:05 EDT
Ok it is not currently possible due to changes in the policy module store structure. 

Previously, .pp files with versions were used in the 2.4 userspace, called a "high level language" file. Currently, these .pp modules are converted to .cil files (CIL stands for Common Intermediate Language) and these .cil files are associated with priorities in the new policy module store structure.
Comment 3 Miroslav Vadkerti 2016-05-09 09:05:30 EDT
I do not like closing this as WONTFIX, sorry. Could we at least print a Warning about policy_module being ignored during the conversion to CIL please?
Comment 4 Fedora Admin XMLRPC Client 2016-09-27 11:02:58 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 Fedora End Of Life 2016-11-24 10:45:39 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Fedora End Of Life 2016-12-20 14:01:23 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 7 Jiri Jaburek 2017-01-02 09:21:17 EST
Warning is displayed now,

Compiling mls test_noaccess module
/usr/bin/checkmodule:  loading policy configuration from tmp/test_noaccess.tmp
/usr/bin/checkmodule:  Module name policy_tools_test is different than the output base filename test_noaccess
/usr/share/selinux/devel/include/Makefile:154: recipe for target 'tmp/test_noaccess.mod' failed

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