Bug 929001

Summary: Unable to disable unconfined module
Product: [Fedora] Fedora Reporter: d. johnson <drjohnson1>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-18 02:50:19 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:
Embargoed:

Description d. johnson 2013-03-29 00:48:33 UTC
Description of problem:

Disable the unconfined modules produces an error.

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

libselinux-2.1.12-7.3.fc18.x86_64
libselinux-python-2.1.12-7.3.fc18.x86_64
libselinux-utils-2.1.12-7.3.fc18.x86_64
selinux-policy-3.11.1-87.fc18.noarch
selinux-policy-devel-3.11.1-87.fc18.noarch
selinux-policy-doc-3.11.1-87.fc18.noarch
selinux-policy-targeted-3.11.1-87.fc18.noarch

How reproducible:

reinstall the policy, and it errors when you disable these modules.

Steps to Reproduce:
1. Update selinux-policy
2. semodule -d unconfined unconfineduser
3. errors
  
Actual results:

# /usr/sbin/semodule -d unconfined unconfineduser
libsepol.context_from_record: user unconfined_u is not defined
libsepol.context_from_record: could not create context structure
libsepol.context_from_string: could not create context structure
libsepol.sepol_context_to_sid: could not convert unconfined_u:object_r:httpd_openshift_script_exec_t:s0 to sid
invalid context unconfined_u:object_r:httpd_openshift_script_exec_t:s0
libsemanage.semanage_install_active: setfiles returned error code 1.
/usr/sbin/semodule:  Failed!

Expected results:

It should work without error

Additional info:

# semanage -o -
boolean -D
boolean -1 daemons_use_tcp_wrapper
boolean -1 global_ssp
boolean -1 gpg_agent_env_file
boolean -1 mock_enable_homedirs
boolean -1 nis_enabled
boolean -1 polyinstantiation_enabled
boolean -0 unconfined_login
login -D
login -a -s user_u -r 's0' __default__
login -a -s staff_u -r 's0-s0:c0.c1023' user1
login -a -s staff_u -r 's0-s0:c0.c1023' user2
login -a -s sysadm_u -r 's0-s0:c0.c1023' root
login -a -s system_u -r 's0-s0:c0.c1023' system_u
user -D
port -D
interface -D
node -D
fcontext -D
fcontext -a -e /tmp-inst/vartmp /var/tmp
fcontext -a -e /tmp-inst/tmp /tmp

Comment 1 Miroslav Grepl 2013-03-29 09:50:41 UTC
Fixed in selinux-policy-targeted-3.11.1-89.fc18.noarch

Comment 2 Fedora Update System 2013-04-15 11:10:51 UTC
selinux-policy-3.11.1-90.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-90.fc18

Comment 3 Fedora Update System 2013-04-16 00:06:17 UTC
Package selinux-policy-3.11.1-90.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-90.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5742/selinux-policy-3.11.1-90.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-04-18 02:50:20 UTC
selinux-policy-3.11.1-90.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.