Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 519823, 584207    
Attachments:
Description Flags
Test case none

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