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

Fix zoneid when USER_NS is disabled #15560

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

Wraithh
Copy link
Contributor

@Wraithh Wraithh commented Nov 22, 2023

getzoneid() should return GLOBAL_ZONEID instead of 0 when USER_NS is disabled.

Motivation and Context

Fixes a Permission denied issue when creating or cloning a dataset when USER_NS is disabled as described in #15241.

Description

getzoneid() on Linux now returns GLOBAL_ZONEID instead of 0 when USER_NS is disabled (or getzoneid fails otherwise).

How Has This Been Tested?

This fixes the problem described in issue #15241

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Copy link
Contributor

@ryao ryao left a comment

Choose a reason for hiding this comment

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

Your commit message is missing a signed-off-by. Use git commit --amend -S to fix it and then git push -f origin issue-15241 to push the fix.

Other than that, this looks fine to me.

getzoneid() should return GLOBAL_ZONEID instead of 0 when USER_NS is disabled.

Signed-off-by: Ilkka Sovanto <github@ilkka.kapsi.fi>
@behlendorf behlendorf requested a review from allanjude November 27, 2023 20:48
@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Nov 27, 2023
@behlendorf behlendorf merged commit 8adf2e3 into openzfs:master Nov 29, 2023
20 of 26 checks passed
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Dec 12, 2023
getzoneid() should return GLOBAL_ZONEID instead of 0 when USER_NS is disabled.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ilkka Sovanto <github@ilkka.kapsi.fi>
Closes openzfs#15560
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants