Update pam_zfs_key.c defaultt path for FreeBSD

As described in https://github.com/freebsd/freebsd-src/pull/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 #17600
This commit is contained in:
Eric A. Borisch authored and GitHub committed 2025-08-27 09:36:37 -07:00
1 parent 976f765341
commit 1da2c30bed
1 file changed
+4
+4
View File
@@ -391,7 +391,11 @@ static int
zfs_key_config_load(pam_handle_t *pamh, zfs_key_config_t *config,
int argc, const char **argv)
{
#if defined(__FreeBSD__)
config->homes_prefix = strdup("zroot/home");
#else
config->homes_prefix = strdup("rpool/home");
#endif
if (config->homes_prefix == NULL) {
pam_syslog(pamh, LOG_ERR, "strdup failure");
return (PAM_SERVICE_ERR);