Skip to content

Update pam_zfs_key.c default path for FreeBSD #17600

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eborisch
Copy link

@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:

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.
@oshogbo
Copy link
Contributor

oshogbo commented Aug 7, 2025

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

@eborisch
Copy link
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

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