Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/unshare: return true from IsRootless if user is not root #1770

Merged
merged 1 commit into from Dec 11, 2023

Conversation

dfr
Copy link
Contributor

@dfr dfr commented Dec 9, 2023

This helps to avoid a confusing error on FreeBSD when commands such as 'podman run' are attempted by a non-root user. Changing IsRootless to return true for these users allows types.DefaultConfigFile to return a user-accessible path for storage.conf which, in turn, allows 'podman run' to get as far as SetupRootless which will generate a more informative message than 'Error: stat
/var/db/containers/storage/libpod/bolt_state.db: permission denied'

This helps to avoid a confusing error on FreeBSD when commands such as
'podman run' are attempted by a non-root user. Changing IsRootless to
return true for these users allows types.DefaultConfigFile to return a
user-accessible path for storage.conf which, in turn, allows 'podman
run' to get as far as SetupRootless which will generate a more
informative message than 'Error: stat
/var/db/containers/storage/libpod/bolt_state.db: permission denied'

Signed-off-by: Doug Rabson <dfr@rabson.org>
@rhatdan
Copy link
Member

rhatdan commented Dec 9, 2023

LGTM
@giuseppe PTAL
/approve

@openshift-ci openshift-ci bot added the approved label Dec 9, 2023
Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

openshift-ci bot commented Dec 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dfr, giuseppe, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@giuseppe
Copy link
Member

the lint failure is not related and fixed by 269cfda

@giuseppe giuseppe merged commit c3764ff into containers:main Dec 11, 2023
4 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants