From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14308 invoked by alias); 26 Jul 2015 15:04:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 14259 invoked by uid 89); 26 Jul 2015 15:04:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout27.012.net.il Received: from mtaout27.012.net.il (HELO mtaout27.012.net.il) (80.179.55.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 26 Jul 2015 15:04:29 +0000 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NS300E00O4E9600@mtaout27.012.net.il> for gdb-patches@sourceware.org; Sun, 26 Jul 2015 18:02:01 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NS30047LOFDRDA0@mtaout27.012.net.il>; Sun, 26 Jul 2015 18:02:01 +0300 (IDT) Date: Sun, 26 Jul 2015 15:04:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH v3] Make sure GDB uses a valid shell when starting the inferior and to perform the "shell" command In-reply-to: <1437869674-7880-1-git-send-email-sergiodj@redhat.com> To: Sergio Durigan Junior Cc: gdb-patches@sourceware.org, sergiodj@redhat.com Reply-to: Eli Zaretskii Message-id: <83pp3fyn7x.fsf@gnu.org> References: <1437761993-18758-1-git-send-email-sergiodj@redhat.com> <1437869674-7880-1-git-send-email-sergiodj@redhat.com> X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00769.txt.bz2 > From: Sergio Durigan Junior > Cc: Eli Zaretskii , Sergio Durigan Junior > 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 > > * 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 > > * 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 > > * gdb.base/invalid-shell.exp: New file. OK for the documentation part. Thanks.