]> git.ipfire.org Git - thirdparty/shadow.git/commit
useradd(8): fallback to regular dir for BTRFS home on non-BTRFS parent
authorHadi Chokr <hadichokr@icloud.com>
Tue, 21 Apr 2026 07:18:19 +0000 (09:18 +0200)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Thu, 23 Apr 2026 12:17:18 +0000 (14:17 +0200)
commit7be9a6540f1cad477fd4f4e83d25904a5095bb86
tree70a74fa5bfe07cad3f44b7f899cb0f3473eaf483
parent96460c7240264c0022cebc9ba1774993ee2594cf
useradd(8): fallback to regular dir for BTRFS home on non-BTRFS parent

When the --btrfs-subvolume-home option is used but the parent directory
is not on a BTRFS filesystem, useradd previously failed with an error.
This is too strict; instead, fall back to creating a regular directory
and issue a warning.  The subvolume creation is attempted only when the
parent is BTRFS.  Otherwise, a regular directory is created and a
syslog(3) warning is logged.

Fixes: 3e8c105 (2026-01-02; "src/useradd: Support config for creating home dirs as Btrfs subvolumes")
Co-authored-by: Hadi Chokr <hadichokr@icloud.com>
Co-authored-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/useradd.8.xml
src/useradd.c