Bug 1391549

Summary: semanage boolean -N seems to have no effect
Product: Red Hat Enterprise Linux 7 Reporter: Dalibor Pospíšil <dapospis>
Component: policycoreutilsAssignee: Vit Mojzis <vmojzis>
Status: CLOSED WONTFIX QA Contact: Dalibor Pospíšil <dapospis>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: dwalsh, lvrabec, mgrepl, mmalik, plautrba, ssekidde, zpytela
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-27 12:30:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dalibor Pospíšil 2016-11-03 14:17:11 UTC
Description of problem:
As I understand correctly semanage make always persistent changes. Option -N should, cause the actual state is unchanged.

# rpm -qf `which semanage`
policycoreutils-python-2.5-8.el7.x86_64

# semanage boolean -m -1 ftpd_full_access
# semanage boolean -l | grep ftpd_full_access
ftpd_full_access               (on   ,   on)  Determine whether ftpd can login to local users and can read and write all files on the system, governed by DAC.

# semanage boolean -m -0 ftpd_full_access
# semanage boolean -l | grep ftpd_full_access
ftpd_full_access               (off  ,  off)  Determine whether ftpd can login to local users and can read and write all files on the system, governed by DAC.

# semanage boolean -N -m -1 ftpd_full_access
# semanage boolean -l | grep ftpd_full_access
ftpd_full_access               (on   ,   on)  Determine whether ftpd can login to local users and can read and write all files on the system, governed by DAC.

I would expect the last change would cause:
# semanage boolean -l | grep ftpd_full_access
ftpd_full_access               (off  ,   on)  Determine whether ftpd can login to local users and can read and write all files on the system, governed by DAC.

Comment 2 Dalibor Pospíšil 2018-01-09 13:29:21 UTC
# semanage boolean -m --off zebra_write_config
# getsebool zebra_write_config
zebra_write_config --> off
# semanage boolean -N -m --on zebra_write_config
# getsebool zebra_write_config
zebra_write_config --> on

I would expect that -N changes only persistent state, not the current state.

Comment 3 Zdenek Pytela 2019-02-27 12:30:31 UTC
This issue was not selected to be included in Red Hat Enterprise Linux 7.7 because it is seen either as low or moderate impact to a small number of use-cases. The next release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available.

We will now close this issue, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open; otherwise, we recommend moving the request to Red Hat Enterprise Linux 8 if applicable.