Bug 2174752

Summary: Provide pidfd for new?idmap
Product: [Fedora] Fedora Reporter: Iker Pedrosa <ipedrosa>
Component: shadow-utilsAssignee: Iker Pedrosa <ipedrosa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: ipedrosa, pvrabec, tm
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: shadow-utils-4.13-5.fc38 shadow-utils-4.12.3-5.fc37 shadow-utils-4.11.1-6.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-18 00:17:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Iker Pedrosa 2023-03-02 11:32:38 UTC
Description of problem:
Provide an interface where we pass a pidfd instead of a PID number to newuidmap and newgidmap. In some cases it isn't possible to reserve PIDs (reaping must be automatic through SIGCHLD) until newuidmap is done. So there's a chance for a race that is unlikely, but would be better to avoid.

Additional info:
https://github.com/shadow-maint/shadow/issues/635

Comment 1 Iker Pedrosa 2023-03-02 12:17:16 UTC
master:
    * newuidmap and newgidmap: support passing pid as fd - 6974df39a708abf8bafbdfa2b7827e0f70f874cb
    * get_pidfd_from_fd: return -1 on error, not 0 - 7ff33fae6f9cd79c0e012671c37a172e9a681d0b
    * Validate fds created by the user - 05e2adf509ba0e3779dae66a276b86927a8e1e0e

Comment 2 Fedora Update System 2023-03-02 14:21:24 UTC
FEDORA-2023-3053b7b71e has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-3053b7b71e

Comment 3 Fedora Update System 2023-03-03 02:22:22 UTC
FEDORA-2023-3053b7b71e has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-3053b7b71e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2023-03-18 00:17:40 UTC
FEDORA-2023-3053b7b71e has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2023-03-21 09:10:52 UTC
FEDORA-2023-8144b7407f has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-8144b7407f

Comment 6 Fedora Update System 2023-03-22 02:24:45 UTC
FEDORA-2023-8144b7407f has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-8144b7407f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-8144b7407f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2023-03-25 02:01:44 UTC
FEDORA-2023-8144b7407f has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2023-03-27 11:03:13 UTC
FEDORA-2023-679ad8cebd has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2023-679ad8cebd

Comment 9 Fedora Update System 2023-03-28 04:08:36 UTC
FEDORA-2023-679ad8cebd has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-679ad8cebd`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-679ad8cebd

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2023-04-12 01:38:13 UTC
FEDORA-2023-679ad8cebd has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.