]> git.ipfire.org Git - thirdparty/util-linux.git/commit
*: use ul_default_shell() for interactive shell spawning
authorAlessandro Ratti <alessandro@0x65c.net>
Sun, 23 Nov 2025 15:24:52 +0000 (16:24 +0100)
committerAlessandro Ratti <alessandro@0x65c.net>
Mon, 1 Dec 2025 17:58:02 +0000 (18:58 +0100)
commit6651ae5822610789d9ca620c4e0e65c3bd4e12af
treecea2fa34fa3b34b09cc22a7164cde8a8f54ef53f
parentbd89462910f32042dbe1882044a5c076638a89b9
*: use ul_default_shell() for interactive shell spawning

Update tools that spawn interactive shells to use ul_default_shell()
for consistent shell resolution. This ensures these tools respect both
$SHELL and the user's configured shell from the passwd database before
falling back to _PATH_BSHELL.

Affected tools:
- script(1): fixes history truncation when invoked without $SHELL
- scriptlive(1): consistent with script(1) behavior
- flock(1): for -c command execution
- more(1): for shell escape feature
- exec_shell (used by unshare(1) and nsenter(1))

This change addresses user reports of data loss due to tools defaulting
to /bin/sh instead of the user's configured shell, particularly affecting
command history with different HISTSIZE configurations.

Addresses: https://github.com/util-linux/util-linux/issues/3865
Signed-off-by: Alessandro Ratti <alessandro@0x65c.net>
lib/exec_shell.c
sys-utils/flock.c
term-utils/script.c
term-utils/scriptlive.c
text-utils/more.c