Proposal: zfs mount -a behavior for pam_zfs_key#18297
Proposal: zfs mount -a behavior for pam_zfs_key#18297verschmelzen wants to merge 2 commits intoopenzfs:masterfrom
Conversation
|
I also noticed that libzfs already has internal procedures to collect and sort mountable filesystems in appropriate order. I believe the same behavior should be implemented in pam_zfs_key for the sake of consistency. It can be done by copying the code, but I also wonder if there is a proper way to expose required procedures as part of libzfs'es interface. |
|
Pushed another proposal in separate commit. Idea is to keep as close to the behavior of In my case it is needed because I the encryption root is at In the current state the patches are just for my personal use. But if the upstream wants it i would be happy to make a single patch for submission with tests. |
|
Also sorry for the CI. I haven't figured out how to stop it :( |
| /* | ||
| * If this filesystem is inconsistent and has a receive resume | ||
| * token, we can not mount it. | ||
| */ |
There was a problem hiding this comment.
I copied this comment from the reference code as is, but i would like to update it based on how this check would be useful in the context of pam
Should pam_zfs_key attempt to mount all the children? I would be willing to complete a patch according to the contribution guidelines in case this change is desired here. Let me know.
Motivation and Context
If dataset structure doesn't mirror file system structure (e.g. based on backup policy) it is possible that nothing is mounted in current implementation of
mount_dataset.For example, here ssh and gnupg directories would not be mounted in current implementation:
Description
Small patch with proposed changes is provided.
How Has This Been Tested?
Will add tests if this is a desired change here.
Types of changes
Checklist:
Signed-off-by.