Bug 2418373 - setcap capability required for gpsd
Summary: setcap capability required for gpsd
Keywords:
Status: CLOSED DUPLICATE of bug 2441643
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 43
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-12-02 16:12 UTC by Dave Koberstein
Modified: 2026-04-20 16:05 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-04-20 16:05:32 UTC
Type: ---
Embargoed:
zpytela: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-3226 0 None None None 2026-02-26 11:38:18 UTC

Description Dave Koberstein 2025-12-02 16:12:12 UTC
Originally this bug was opened: Bug 2369215.

Under the bug for which it was marked as a duplicate, the kernel was fixed to dial back the required capability from sysadmin to setcap. 

Now we need a policy change to give gpsd the setcap capability. 

The following audit2allow te file provides the necessary capability. Could we get selinux modified to include this? 

# cat my-gpsd.te
module my-gpsd 1.0;

require {
        type gpsd_t;
        class process setcap;
}

#============= gpsd_t ==============
allow gpsd_t self:process setcap;

Comment 1 Ondrej Mosnáček 2025-12-02 16:52:25 UTC
FWIW, this is unrelated to the sys_admin bug. In this case gpsd simply calls some libcap function, which calls capset(2). It looks like it tries to drop privileges here: https://gitlab.com/gpsd/gpsd/-/blob/master/gpsd/gpsd.c?ref_type=heads#L2780-2803 So it should probably be allowed.

Comment 2 Stan King 2025-12-20 00:18:20 UTC
I receive this error each time I start one of my systems.  Let me know if I can provide more information or testing.

Comment 3 Dave Koberstein 2025-12-20 01:05:29 UTC
I was reading the latest comment and then realized my cat output is missing in my initial description. 

Here it is: 

module my-gpsd 1.0;

require {
        type gpsd_t;
        class process setcap;
}

#============= gpsd_t ==============
allow gpsd_t self:process setcap;

Comment 4 Zdenek Pytela 2026-04-20 16:05:32 UTC

*** This bug has been marked as a duplicate of bug 2441643 ***


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