Re: [PATCH] Make sure GDB uses a valid shell when starting the inferior and to perform the "shell" command

Eli Zaretskii
2015-07-24T19:17:39Z

> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Cc: GDB Patches <gdb-patches@sourceware.org>
> Date: Fri, 24 Jul 2015 15:10:27 -0400
>
> > Note that on my Ubuntu 14.04:
> >
> > $ which nologin
> > /usr/sbin/nologin
>
> /sbin/nologin is probably a symlink to this file, isn't it? But yeah,
> the check could include /usr/sbin/nologin as well.
>
> > I think that /bin/false is also commonly specified as the default shell
> > for system users (at least according to my /etc/passwd).
>
> Indeed. I will include /bin/false as well.

Since the number of valid shells is much smaller than the number of
non-shell programs, isn't it better to have a database of known shells
than to have a database of non-shells people could be expected to set
SHELL to?