Bug 593635 - Capabilities can't be set on just a thread
Summary: Capabilities can't be set on just a thread
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libcap-ng   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Steve Grubb
QA Contact: Eduard Benes
URL:
Whiteboard:
Keywords: Rebase
Depends On:
Blocks: 519823 584207
TreeView+ depends on / blocked
 
Reported: 2010-05-19 11:23 UTC by Steve Grubb
Modified: 2010-07-02 19:22 UTC (History)
1 user (show)

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 19:22:45 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

Description Steve Grubb 2010-05-19 11:23:15 UTC
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 11:34:58 UTC
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 14:19:01 UTC
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 14:22:29 UTC
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 17:11:47 UTC
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 19:22:45 UTC
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.