Bug 593635 - Capabilities can't be set on just a thread
Capabilities can't be set on just a thread
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libcap-ng (Show other bugs)
6.0
All Linux
high Severity medium
: rc
: ---
Assigned To: Steve Grubb
Eduard Benes
: Rebase
Depends On:
Blocks: 519823 584207
  Show dependency treegraph
 
Reported: 2010-05-19 07:23 EDT by Steve Grubb
Modified: 2010-07-02 15:22 EDT (History)
1 user (show)

See Also:
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:


Attachments (Terms of Use)
Test case (1.28 KB, text/plain)
2010-05-19 10:22 EDT, Steve Grubb
no flags Details

  None (edit)
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
inclusion.
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 0.0.0.0. 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
all:
        gcc -g pthread-cap-test.c -o pthread-cap-test $(LIBS)

clean:
        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.

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