HomeFreeBSD

pw userdel: destroy home dataset if empty

Description

pw userdel: destroy home dataset if empty

When removing a user's home directory, if the directory is a ZFS
dataset, it cannot be removed. If the directory has been emptied,
use "zfs destroy" to destroy it. This complements the automatic
dataset creation in adduser. Note that datasets within the directory
and snapshots are not handled, as the complete path is not constructed.

While here, add waitpid() calls to rmat() and pw_user_del().

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

Details

Provenance
karelsAuthored on May 29 2024, 11:55 PM
Reviewer
des
Differential Revision
D45348: pw userdel: destroy home dataset if empty
Parents
rG19dbf72a2701: bhyve: correctly remove a memory mapping
Branches
Unknown
Tags
Unknown