-
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
base: master
Are you sure you want to change the base?
Conversation
756fecc
to
15404d0
Compare
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 :) |
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.
1050b16
to
911d30b
Compare
@behlendorf friendly reminder |
b8b930f
to
50f69a9
Compare
@jkolo sorry this PR fell though the cracks. This should be ready to go once the indents are fixed. |
7ce729f
to
5a60996
Compare
@tonyhutter and @behlendorf fixed and rebased |
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.
Thanks, can you squash the commits too?
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]>
5a60996
to
bbd4558
Compare
@tonyhutter commits have been squashed |
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.