]> git.ipfire.org Git - thirdparty/util-linux.git/commit
login-utils, sys-utils: use _PATH_BSHELL consistently
authorAlessandro Ratti <alessandro@0x65c.net>
Sun, 23 Nov 2025 15:26:37 +0000 (16:26 +0100)
committerAlessandro Ratti <alessandro@0x65c.net>
Mon, 1 Dec 2025 17:58:02 +0000 (18:58 +0100)
commit54023fdf092ca479e1ccd5e6a7aa69cef68f840a
tree7cac8cd84c6bfd9d29f40c65752c947b47246590
parent6651ae5822610789d9ca620c4e0e65c3bd4e12af
login-utils, sys-utils: use _PATH_BSHELL consistently

Remove local DEFAULT_SHELL definitions and hardcoded "/bin/sh" strings
in favor of the standard _PATH_BSHELL macro from <paths.h>. This
provides consistency across the codebase while following libc
conventions.

These tools already perform their own passwd lookups and only need a
fallback value, so they don't require the full ul_default_shell()
resolution logic.

Affected tools:
- su(1): already checks pw_shell validity
- sulogin(8): emergency login with explicit shell handling
- setpriv(1): already has passwd entry for environment setup

Signed-off-by: Alessandro Ratti <alessandro@0x65c.net>
login-utils/su-common.c
login-utils/sulogin.c
sys-utils/setpriv.c