Bug 255441

Summary: missing Requires: libselinux-devel
Product: [Fedora] Fedora Reporter: Wart <wart>
Component: procpsAssignee: Tomas Smetana <tsmetana>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: sdsmall
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-27 07:33:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Wart 2007-08-26 20:53:12 UTC
Description of problem:
/usr/bin/ps uses dlopen() on libselinux.so in order to determine the selinux
security contexts for each process.  libselinux.so recently moved from the
libselinux package to libselinux-devel.  However, procps has no 'Requires:
libselinux-devel' in order to satisfy the libselinux.so requirement. 
Alternately, procps could be modified to open libselinux.so.1 directly, instead
of using the unversioned symlink.

Version-Release number of selected component (if applicable):
procps-3.2.7-15.1.fc8

How reproducible:
Always

Steps to Reproduce:
1. Perform a fresh F-7 install and upgrade to the latest Rawhide
2. Notice that libselinux-devel is not installed
3. run 'strace -o trace.out ps auwxZ | head'
  
Actual results:
Security contexts are displayed as '-'.  The strace output shows that
libselinux.so could not be found.

Expected results:
Security contexts displayed as they were before.

Additional Notes:
I suspect this wasn't a problem before because almost every installation has
libselinux installed, even if selinux is disabled.  But since the libselinux.so
symlink moved to libselinux-devel, it's not safe to assume that libselinux.so is
installed anymore.

Comment 1 Tomas Smetana 2007-08-27 06:47:59 UTC
I prefer opening libselinux.so.1 instead of adding a dependency on devel
package.    This should be fixed in the next release.

Comment 3 Stephen Smalley 2007-11-01 13:49:48 UTC
This bug exists in F7 as well.
yum remove libselinux-devel
ps -Z
yields "-" for all labels.


Comment 4 James Morris 2007-11-01 13:51:13 UTC
Why should a devel library be needed for "ps" ?

Comment 5 Stephen Smalley 2007-11-01 14:19:54 UTC
Upstream procps always dlopen's libselinux.so.1.
This bug is specific to the Fedora procps and its patches.


Comment 6 Tomas Smetana 2007-11-01 15:12:37 UTC
I'll try to explain...  This is a "double bug": procps shouldn't have dlopened
the nonversioned DSO and libselinux (non-devel) shouldn't have provided that
DSO.  The recent Koji build of libselinux for F-7 has this in the changelog:

* Thu Sep 27 2007 Dan Walsh <dwalsh> - 2.0.14-10
- Move libselinux.so back to base package

<...>

* Fri Aug 10 2007 Dan Walsh <dwalsh> - 2.0.14-5
- Move libselinux.so to devel package

This doesn't mean Stephen is not right.  I only considered this to be a minor
problem in F-7 (.so was in the base package then) and fixed it only in rawhide.
 I'll fix it also in F-7.

Comment 7 Fedora Update System 2007-11-09 23:44:29 UTC
procps-3.2.7-16.1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update procps'

Comment 8 Fedora Update System 2007-11-26 18:40:32 UTC
procps-3.2.7-16.1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.