HomeFreeBSD

adduser: create dataset only if home is directly within dataset

Description

adduser: create dataset only if home is directly within dataset

Currently, if the prefix of the new home directory is a subdirectory
of a ZFS dataset, adduser will create a new dataset up one or more
levels from the intended destination. "pw useradd" will then create
a normal directory in the desired location, leaving an unused dataset.
Check for this situation when determining whether to create a dataset,
and let pw create the directory.

Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D45229

(cherry picked from commit 0b39b2e2ddb2df1d1325e042893ddcb1a1c12b8e)

Details

Provenance
karelsAuthored on May 20 2024, 1:43 PM
Reviewer
des
Differential Revision
D45229: adduser: create dataset only if home is directly within dataset
Parents
rGea5a708625e5: geli: allocate a UMA pool earlier
Branches
Unknown
Tags
Unknown