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
MFC after: 3 days

(cherry picked from commit 0b39b2e2ddb2df1d1325e042893ddcb1a1c12b8e)

Details

Provenance
karelsAuthored on May 20 2024, 1:43 PM
desCommitted on Aug 21 2024, 10:29 AM
Reviewer
des
Differential Revision
D45229: adduser: create dataset only if home is directly within dataset
Parents
rG5f3f07397a79: pf: invert direction for inner icmp state lookups
Branches
Unknown
Tags
Unknown