Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 4
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
Depends On:
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:
Last Closed: 2005-09-15 15:58:42 UTC

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):

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.