Skip to content

Commands spawning non-interactive shells should not use the user's shell from /etc/passwd #4242

@Saur2000

Description

@Saur2000

After #3865, commands such as flock that spawn a non-interactive shell may now use the user's configured shell to run commands. This surprised me, as it triggered a hard to identify bug when building with OpenEmbedded. OE unsets SHELL since more than ten years so that $SHELL shall not affect flock, but with the recent changes this now instead leads to flock picking up the shell from the user's configuration. And it may not be suitable for running commands, which was the case for me, where flock all of a sudden started to use Zsh when running its commands.

I can understand the want to use the user's shell when starting an interactive shell, but for non-interactive shells it makes no sense and is very unexpected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BACKPORT-NEEDEDFix should be backported to stable/* maintenance branches.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions