Skip to content

ostree-ext: Keep CAP_DAC_READ_SEARCH when passing auth via fd#2303

Open
gursewak1997 wants to merge 1 commit into
bootc-dev:mainfrom
gursewak1997:fix-anaconda-auth-permission-denied
Open

ostree-ext: Keep CAP_DAC_READ_SEARCH when passing auth via fd#2303
gursewak1997 wants to merge 1 commit into
bootc-dev:mainfrom
gursewak1997:fix-anaconda-auth-permission-denied

Conversation

@gursewak1997

Copy link
Copy Markdown
Contributor

When running under systemd, ostree-ext drops privileges to 'nobody' with setpriv --bounding-set -all. However, skopeo needs to re-open auth file descriptors at /proc/self/fd/N, which requires CAP_DAC_READ_SEARCH.

Fix by conditionally keeping this capability when auth_data is present: setpriv --bounding-set -all,+dac_read_search

This fixes Anaconda installations with authenticated registries while maintaining security (still runs as unprivileged user).

When running under systemd, ostree-ext drops privileges to 'nobody'
with setpriv --bounding-set -all. However, skopeo needs to re-open
auth file descriptors at /proc/self/fd/N, which requires
CAP_DAC_READ_SEARCH.

Fix by conditionally keeping this capability when auth_data is present:
setpriv --bounding-set -all,+dac_read_search

This fixes Anaconda installations with authenticated registries while
maintaining security (still runs as unprivileged user).

Signed-off-by: gursewak1997 <gursmangat@gmail.com>
@github-actions github-actions Bot added the area/ostree Issues related to ostree label Jul 9, 2026
@bootc-bot bootc-bot Bot requested a review from jmarrero July 9, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ostree Issues related to ostree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant