Bug 593635

Summary: Capabilities can't be set on just a thread
Product: Red Hat Enterprise Linux 6 Reporter: Steve Grubb <sgrubb>
Component: libcap-ngAssignee: Steve Grubb <sgrubb>
Status: CLOSED CURRENTRELEASE QA Contact: Eduard Benes <ebenes>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: ebenes
Target Milestone: rcKeywords: Rebase
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: libcap-ng-0.6.4-2.el6 Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-02 15:22:45 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 519823, 584207    
Description Flags
Test case none

Description Steve Grubb 2010-05-19 07:23:15 EDT
Description of problem:
When changing capabilities on a thread, it actually changes the capabilities for the process. Will attach reproducer.
Comment 1 RHEL Product and Program Management 2010-05-19 07:34:58 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
Comment 2 Steve Grubb 2010-05-19 10:19:01 EDT
libcap-ng-0.6.4-1..el6 was built to solve this problem.

libcap-ng0.6.4 only has 2 changes over the 0.6.2-5 package. When running on a system that has a program that is using a packet socket, it will now print the interface that its binding to. An example of this is if you have a system using dhclient rather than network manager, the dhcp process will show something like eth0 instead of You can also try this with tcpdump and set the user to root so that it keeps capabilities.

The other change fixes the bug mentioned above. I will attach a test program for that.
Comment 3 Steve Grubb 2010-05-19 10:22:29 EDT
Created attachment 415135 [details]
Test case

This program can be used as a starting point for an automated test. On libcap-ng-0.6.2, you should see a "failed" message. On libcap-ng-0.6.4, you should not. Below is the Makefile that goes with this test case.

LIBS= -lcap-ng -lpthread
        gcc -g pthread-cap-test.c -o pthread-cap-test $(LIBS)

        rm -f pthread-cap-test *.o
Comment 9 Steve Grubb 2010-05-24 13:11:47 EDT
Built libcap-ng-0.6.4-2.el6 to address this problem and to add a requires %{name} = %{version}-%{release} to the utils subpackage.
Comment 14 releng-rhel@redhat.com 2010-07-02 15:22:45 EDT
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.