Skip to content

Conversation

eborisch
Copy link
Contributor

@eborisch eborisch commented Aug 7, 2025

As described in freebsd/freebsd-src#1305 : FreeBSD's installer defaults to zroot/home for user home directories.

For FreeBSD only, set the default prefix for pam_zfs_key to match.

Motivation and Context

This will resolve freebsd/freebsd-src#1305 : have the default for pam_zfs_key's home directory root match what FreeBSD installer sets it to.

Description

FreeBSD-only (ifdef-ed) change of the default (in the zfs tree) home location for pam_zfs_key.

How Has This Been Tested?

No testing of this minor change. pam_zfs_key isn't quite "ready for prime time" (IMHO) on FreeBSD, but this is one step towards that.

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)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • 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:

@oshogbo
Copy link
Contributor

oshogbo commented Aug 7, 2025

Maybe this should be somehow configured instead of the hardcoded path?

@eborisch
Copy link
Contributor Author

eborisch commented Aug 7, 2025

Maybe this should be somehow configured instead of the hardcoded path?

It is configurable with the homes= argument in the pam configuration; this is just setting the default (for FreeBSD) to match the FreeBSD installer’s default naming.

Copy link
Member

@amotin amotin left a comment

Choose a reason for hiding this comment

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

I can't say that I like this change of the default, since somebody might actually use the old name already, and they may end up in an inconvenient position. But if FreeBSD people wish to have this...

@amotin amotin added the Status: Code Review Needed Ready for review and testing label Aug 7, 2025
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

It'd be nice not to have a different defaults, but if it makes things simpler for the FreeBSD installer then I'm fine with it.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Aug 7, 2025
@behlendorf
Copy link
Contributor

@eborisch please update the commit message with your signed-off-by, then this should be all set.

https://github.com/openzfs/zfs/actions/runs/16793233992/job/47558772845?pr=17600

@behlendorf behlendorf added the Status: Revision Needed Changes are required for the PR to be accepted label Aug 11, 2025
@behlendorf
Copy link
Contributor

@eborisch can you add your signed off by to the commit and update this PR. If not, we'll have to close it out.

git commit --amend -s

As described in freebsd/freebsd-src#1305 : FreeBSD's installer defaults to zroot/home for user home directories.

For FreeBSD only, set the default prefix for pam_zfs_key to match.

Signed-off-by: Eric A. Borisch <[email protected]>
@eborisch eborisch force-pushed the pam_zfs_key-default-home branch from 72c2c03 to b453d9f Compare August 27, 2025 01:21
@github-actions github-actions bot removed Status: Accepted Ready to integrate (reviewed, tested) Status: Revision Needed Changes are required for the PR to be accepted labels Aug 27, 2025
@eborisch
Copy link
Contributor Author

Done. Apologies for the delay.

@behlendorf behlendorf merged commit 1da2c30 into openzfs:master Aug 27, 2025
34 of 41 checks passed
@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Aug 27, 2025
spauka pushed a commit to spauka/zfs that referenced this pull request Aug 30, 2025
As described in freebsd/freebsd-src#1305,
FreeBSD's installer defaults to zroot/home for user home directories.

For FreeBSD only, set the default prefix for pam_zfs_key to match.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Eric A. Borisch <[email protected]>
Closes openzfs#17600
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.

4 participants