Bug 1311922 - module name and version defined by policy_module is being ignored with CIL
Summary: module name and version defined by policy_module is being ignored with CIL
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 23
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1281852
TreeView+ depends on / blocked
 
Reported: 2016-02-25 10:43 UTC by Miroslav Vadkerti
Modified: 2023-09-14 03:18 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1345825 (view as bug list)
Environment:
Last Closed: 2016-12-20 19:01:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miroslav Vadkerti 2016-02-25 10:43:14 UTC
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)
[snip]

# 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
tmp/test_noaccess.mod
Creating mls test_noaccess.pp policy package
rm tmp/test_noaccess.mod.fc tmp/test_noaccess.mod

# semodule -i test_noaccess.pp | grep noaccess
test_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):
selinux-policy-3.13.1-158.4.fc23

How reproducible:
100%

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 09:03:34 UTC
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 06:29:05 UTC
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 13:05:30 UTC
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 15:02:58 UTC
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 15:45:39 UTC
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 19:01:23 UTC
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
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 7 Jiri Jaburek 2017-01-02 14:21:17 UTC
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

Comment 8 Red Hat Bugzilla 2023-09-14 03:18:30 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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