Bug 159038 - postinstall script tests size of selinuxenabled as string rather than execute it
Summary: postinstall script tests size of selinuxenabled as string rather than execute it
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-05-27 22:41 UTC by Göran Uddeborg
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 1.25.4-10.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-15 15:58:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Göran Uddeborg 2005-05-27 22:41:13 UTC
Description of problem:
In the postinstall script of the s-p-t-source package, there is a test
        if [ "${SELINUXTYPE}" = "targeted" -a /usr/sbin/selinuxenabled ]; then
This is true if $SELINUXTYPE is targeted, and if the string
/usr/sbin/selinuxanabled is non-null.  The latter is of course always true.  But
I bet the intended test is to see if SELinux is enabled, which is achieved by
executing the command instead.  As in this expression
        if [ "${SELINUXTYPE}" = "targeted" ] && /usr/sbin/selinuxenabled; then


Version-Release number of selected component (if applicable):
selinux-policy-targeted-1.23.14-2.src.rpm

Additional info:
The same problem is true in the strict policy.  Do you want a separate bugzilla
or do you fix both from this report?

Comment 1 Daniel Walsh 2005-05-28 05:17:33 UTC
Fixed in selinux-policy-*-1.23.17-3

Comment 2 David Juran 2005-05-29 16:18:02 UTC
Now the postinstall script has a syntax error. Try replacing the '-a' on line
229 with a '&&' instead (-: 


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