Skip to content

Bugfix: Simplify BTRFS checks and improve useradd behavior for non-BTRFS#1614

Merged
alejandro-colomar merged 5 commits intoshadow-maint:masterfrom
silverhadch:master
Apr 23, 2026
Merged

Bugfix: Simplify BTRFS checks and improve useradd behavior for non-BTRFS#1614
alejandro-colomar merged 5 commits intoshadow-maint:masterfrom
silverhadch:master

Conversation

@silverhadch
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
alejandro-colomar and others added 4 commits April 22, 2026 12:05
This simplifies the return value of is_btrfs() into a boolean.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
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>
Signed-off-by: Hadi Chokr <hadichokr@icloud.com>
Reviewed-by: Alejandro Colomar <alx@kernel.org>
@alejandro-colomar
Copy link
Copy Markdown
Collaborator

alejandro-colomar commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a significant improvement over the previous versions. Thank you for the great effort here!

@alejandro-colomar alejandro-colomar merged commit 827f69b into shadow-maint:master Apr 23, 2026
16 checks passed
@Conan-Kudo
Copy link
Copy Markdown
Contributor

@ikerexxe can we get this backported into Fedora please?

@ikerexxe
Copy link
Copy Markdown
Collaborator

@Conan-Kudo this is for fedora rawhide https://bodhi.fedoraproject.org/updates/FEDORA-2026-2ad058a479.

Do you also expect it in fedora 44?

@Conan-Kudo
Copy link
Copy Markdown
Contributor

Yes, please, if you can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants