This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3] Make sure GDB uses a valid shell when starting the inferior and to perform the "shell" command
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: gdb-patches at sourceware dot org, sergiodj at redhat dot com
- Date: Sun, 26 Jul 2015 18:04:18 +0300
- Subject: Re: [PATCH v3] Make sure GDB uses a valid shell when starting the inferior and to perform the "shell" command
- Authentication-results: sourceware.org; auth=none
- References: <1437761993-18758-1-git-send-email-sergiodj at redhat dot com> <1437869674-7880-1-git-send-email-sergiodj at redhat dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, Sergio Durigan Junior <sergiodj@redhat.com>
> Date: Sat, 25 Jul 2015 20:14:34 -0400
>
> I updated the documentation to reflect the new behavior, and created a
> testcase to exercise the code. This patch has been regression-tested
> on Fedora 22 x86_64.
>
> OK to apply?
>
> Changes from v2:
>
> - Rewrote "Valid Shell" section in the documentation to mention that
> the tests performed are not exhaustive. Included a small example
> to demonstrate what happens if the user tries to use /bin/ls as
> the $SHELL (a "valid shell", in theory).
>
> Changes from v1:
>
> - Using @pxref instead of @ref in the documentation
>
> - Don't run the testcase when the target is mingw, cygwin, or remote
>
> - Including /usr/sbin/nologin and /bin/false in the list of invalid
> shells
>
> gdb/ChangeLog:
> 2015-07-24 Sergio Durigan Junior <sergiodj@redhat.com>
>
> * cli/cli-cmds.c (shell_escape): Check if the selected shell is
> valid.
> * fork-child.c (check_startup_with_shell): New function.
> (fork_inferior): Move code to the new function above. Call it.
> * utils.c (valid_shell): New function.
> * utils.h (valid_shell): New prototype.
>
> gdb/doc/ChangeLog:
> 2015-07-24 Sergio Durigan Junior <sergiodj@redhat.com>
>
> * gdb.texinfo (Shell Commands): Mention that the shell needs to be
> valid; point to "Valid Shell" subsection.
> (Valid Shell): New subsection.
> (Starting your Program): Mention that the shell needs to be valid;
> point to "Valid Shell" subsection.
> (Your Program's Arguments): Likewise.
> (Your Program's Environment): Likewise.
>
> gdb/testsuite/ChangeLog:
> 2015-07-24 Sergio Durigan Junior <sergiodj@redhat.com>
>
> * gdb.base/invalid-shell.exp: New file.
OK for the documentation part.
Thanks.