-
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
Allow different name for user data #11165
Conversation
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.
@felixdoerre as the original author would you mind reviewing this.
can you do something better than |
That is a recursive call from within a wrapper I can simplify the searching so it starts from |
@CragW can you please rebase this on the latest version of the master branch, squash your commits, and force update the PR. |
Name of dataset for user home directory may vary from the expected $homes_prefix/$username, if different naming scheme is being used. We can use property mountpoint to specify the dataset for $username as long as its value is identical to passwd's pw_dir. For example: NAME PROPERTY VALUE rpool/home/myuser_123456 mountpoint /home/myuser Signed-off-by: Crag Wang <crag0715@gmail.com>
Done. BIG THANKS to @behlendorf and @felixdoerre . |
Name of dataset for user home directory may vary from the expected $homes_prefix/$username, if different naming scheme is being used. We can use property mountpoint to specify the dataset for $username as long as its value is identical to passwd's pw_dir. For example: NAME PROPERTY VALUE rpool/home/myuser_123456 mountpoint /home/myuser Reviewed-by: Felix Dörre <felix@dogcraft.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Crag Wang <crag0715@gmail.com> Closes #11165
Name of dataset for user home directory may vary from the expected $homes_prefix/$username, if different naming scheme is being used. We can use property mountpoint to specify the dataset for $username as long as its value is identical to passwd's pw_dir. For example: NAME PROPERTY VALUE rpool/home/myuser_123456 mountpoint /home/myuser Reviewed-by: Felix Dörre <felix@dogcraft.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Crag Wang <crag0715@gmail.com> Closes openzfs#11165
Name of dataset for user home directory may vary from the expected $homes_prefix/$username, if different naming scheme is being used. We can use property mountpoint to specify the dataset for $username as long as its value is identical to passwd's pw_dir. For example: NAME PROPERTY VALUE rpool/home/myuser_123456 mountpoint /home/myuser Reviewed-by: Felix Dörre <felix@dogcraft.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Crag Wang <crag0715@gmail.com> Closes openzfs#11165
Motivation and Context
Currently, the name of dataset for each user is predicted statically, as homes_prefix e.g. rpool/home, followed by user's name e.g. rpool/home/test. However, the naming style may vary from current prediction according to users own preference.
The problem for instance, filesystem dataset rpool/home/test_123456 is given to user test as home directory to hold user data, rather than the predicted name. In this case, failure is seen due to missing rpool/home/test.
Description
Proposed change in this commit brings option prop_mountpoint to pam_zfs_key.so module. Given option will take passwd's pw_dir e.g. /home/test comparing with property mountpoint from walking through all the filesystem datasets until one has the value matched.
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.