From: Christian Goeschel Ndjomouo Date: Thu, 16 Apr 2026 04:18:59 +0000 (-0400) Subject: flock: re-enable the initial shell selection logic X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=945c664e019e8b4e7a2d574962521e3e747a78ec;p=thirdparty%2Futil-linux.git flock: re-enable the initial shell selection logic Commit 6651ae5 added /etc/passwd to the list of shells to choose from before falling back to _PATH_BSHELL. This introduced a regression as some tools dont expect this behavior and assume that unsetting SHELLS is enough. To re-establish the old behavior we can pass the UL_SHELL_NOPWD flag to the ul_default_shell() helper to ignore shells in /etc/passwd. Addresses: #4242 Signed-off-by: Christian Goeschel Ndjomouo --- diff --git a/sys-utils/flock.c b/sys-utils/flock.c index cfd7686d7..9133f1e1a 100644 --- a/sys-utils/flock.c +++ b/sys-utils/flock.c @@ -330,7 +330,7 @@ int main(int argc, char *argv[]) _("%s requires exactly one command argument"), argv[optind + 1]); cmd_argv = sh_c_argv; - cmd_argv[0] = (char *)ul_default_shell(0, NULL); + cmd_argv[0] = (char *)ul_default_shell(UL_SHELL_NOPWD, NULL); cmd_argv[1] = "-c"; cmd_argv[2] = argv[optind + 2]; cmd_argv[3] = NULL;