-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add recursive dataset mounting support to pam_zfs_key #16857
Open
jkolo
wants to merge
2
commits into
openzfs:master
Choose a base branch
from
jkolo:pam_zfs_mount_recursively
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
Status: Work in Progress
Not yet ready for general review
label
Dec 12, 2024
jkolo
force-pushed
the
pam_zfs_mount_recursively
branch
3 times, most recently
from
December 12, 2024 09:55
756fecc
to
15404d0
Compare
github-actions
bot
added
Status: Code Review Needed
Ready for review and testing
and removed
Status: Work in Progress
Not yet ready for general review
labels
Dec 12, 2024
jkolo
force-pushed
the
pam_zfs_mount_recursively
branch
12 times, most recently
from
December 16, 2024 01:34
b685481
to
cfc137e
Compare
Pull request is ready for merge. Is there anything else I should do to get it to pass review? @behlendorf sorry for calling directly. I didn't know who or where best to ask :) |
behlendorf
approved these changes
Dec 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense. Thanks for working on this and adding the test case.
jkolo
force-pushed
the
pam_zfs_mount_recursively
branch
from
December 21, 2024 03:10
8a25cee
to
1050b16
Compare
Introduced functionality to recursively mount datasets with a new config option `mount_recursively`. Adjusted existing functions to handle the recursive behavior and added tests to validate the feature. This enhances support for managing hierarchical ZFS datasets within a PAM context. Signed-off-by: Jerzy Kołosowski <[email protected]>
Removed unnecessary comments from return statements that were redundant and made the code cleaner. This does not impact functionality but enhances readability and maintainability. Signed-off-by: Jerzy Kołosowski <[email protected]>
jkolo
force-pushed
the
pam_zfs_mount_recursively
branch
from
December 21, 2024 03:10
1050b16
to
911d30b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Title
Add recursive dataset mounting support to pam_zfs_key
Motivation and Context
This change introduces the ability to recursively mount ZFS datasets using a new configuration option,
mount_recursively
. This enhancement solves the need for hierarchical or nested dataset management in environments that utilizepam_zfs_key
, ensuring all eligible child datasets are mounted as part of the session functionality.This feature improves the flexibility and usability of
pam_zfs_key
when managing complex dataset organizations.Description
mount_recursively
, which ensures child datasets of a given root can also be mounted.decrypt_mount()
function to integrate recursive mounting functionality, leveragingzfs_iter_filesystems_v2
for child dataset traversal.canmount
andmountpoint
are respected during recursive mounting.zfs_key_config_t
) to include themount_recursively
option.pam_mount_recursively.ksh
, to validate recursive mounting behavior and edge cases (e.g., "none", "legacy", "noauto", and "off" mountpoints).How Has This Been Tested?
Added a functional test (
tests/zfs-tests/tests/functional/pam/pam_mount_recursively.ksh
) that:mount_recursively
flag enabled.canmount
andmountpoint
properties).open_session
andclose_session
) via PAM.canmount=on
and appropriate mountpoint properties.Manual testing performed on Linux configurations using
pamtester
to ensure real-world applicability.Verified backward compatibility where
mount_recursively
is not enabled.Types of Changes
Checklist
Signed-off-by
.Let me know if additional details are required.