Bug 678241 - semanage permissive -d removes more than expected
Summary: semanage permissive -d removes more than expected
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libsemanage
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Petr Lautrbach
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-17 09:32 UTC by Milos Malik
Modified: 2016-11-07 14:22 UTC (History)
2 users (show)

Fixed In Version: libsemanage-2.0.45-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 14:22:49 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Milos Malik 2011-02-17 09:32:10 UTC
Description of problem:


Version-Release number of selected component (if applicable):
policycoreutils-python-2.0.83-19.1.el6.x86_64
policycoreutils-2.0.83-19.1.el6.x86_64

How reproducible:
always

Steps to Reproduce:
# semanage permissive -l | grep fenced
# semanage permissive -a fenced_t
# semanage permissive -l | grep fenced
fenced_t
# semanage permissive -d fenced
# echo $?
0
# semanage permissive -l | grep fenced
# 

Actual results:
* no error message
* exit code = 0
* fenced_t is removed from the list of permissive domains

Expected results:
* error message appears
* exit code > 0
* fenced_t is still present in the list of permissive domains

Comment 2 RHEL Program Management 2011-02-17 09:57:47 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 3 Milos Malik 2011-02-17 12:22:18 UTC
The same happens when you use "semanage permissive -d" and any of these strings: "f", "fe", "fen", "fenc", "fence", "fenced_".

Comment 4 Milos Malik 2011-02-17 12:31:59 UTC
Another reproducer:

# semanage permissive -a ypbind_t
# semanage permissive -a ypserv_t
# semanage permissive -l | grep yp
Builtin Permissive Types 
Customized Permissive Types
ypbind_t
ypserv_t
# semanage permissive -d yp
# semanage permissive -l | grep yp
Builtin Permissive Types 
Customized Permissive Types
ypserv_t
#

Comment 5 Daniel Walsh 2011-02-18 20:45:16 UTC
Strange I am not seeing this here.

Comment 8 Daniel Walsh 2011-02-21 19:16:24 UTC
Ok I recreated it on my RHEL6 box.  Seems to work correctly on F14.  I am looking into it.

This looks like an libsemanage problem.

Comment 9 Daniel Walsh 2011-02-21 19:17:08 UTC
Fixed in libsemanage-2.0.45-1.el6

Comment 10 Daniel Walsh 2011-02-21 19:20:40 UTC
I have a scratch build here
that you can test

https://brewweb.devel.redhat.com/taskinfo?taskID=3128494

Comment 11 Milos Malik 2011-02-22 08:27:28 UTC
Still the same.

# rpm -qa | grep -e libsemanage -e policycoreutils -e libselinux -e libsepol | sort
libselinux-2.0.94-3.el6.x86_64
libselinux-devel-2.0.94-3.el6.x86_64
libselinux-python-2.0.94-3.el6.x86_64
libselinux-utils-2.0.94-3.el6.x86_64
libsemanage-2.0.45-1.el6.x86_64
libsemanage-python-2.0.45-1.el6.x86_64
libsepol-2.0.41-3.el6.x86_64
libsepol-devel-2.0.41-3.el6.x86_64
policycoreutils-2.0.83-19.1.el6.x86_64
policycoreutils-python-2.0.83-19.1.el6.x86_64
#
# semanage permissive -l | grep fence
# semanage permissive -a fenced_t
# semanage permissive -l | grep fence
fenced_t
# semanage permissive -d fen
# echo $?
0
# semanage permissive -l | grep fence
#

Comment 12 Daniel Walsh 2011-02-22 14:52:01 UTC
Yes it is still broken.  I tried it yesterday and it seemed to work.  But now I see it on Rawhide also.

I believe the problem is in libsemanage.

Comment 13 RHEL Program Management 2011-07-06 00:01:17 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 22 RHEL Program Management 2013-10-14 01:10:22 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 25 Petr Lautrbach 2016-11-04 14:49:49 UTC
It seems to be fixed by https://github.com/SELinuxProject/selinux/commit/c9b09be4244f3c90cee19d9e3feca324f0e0e636

Comment 26 Petr Lautrbach 2016-11-07 14:22:49 UTC
Red Hat Enterprise Linux version 6 is in the Production 2 phase of its lifetime and the fix for this bug is not trivial. Also this bug doesn't meet the criteria for the phase 2, i.e. only high severity issues will be fixed. Please see https://access.redhat.com/support/policy/updates/errata/ for further information.


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