From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16893 invoked by alias); 20 Nov 2010 02:50:54 -0000 Received: (qmail 16885 invoked by uid 22791); 20 Nov 2010 02:50:53 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 20 Nov 2010 02:50:45 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAK2oinu011354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Nov 2010 21:50:44 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAK2oeLl002004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Nov 2010 21:50:43 -0500 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id oAK2ocwH023164; Sat, 20 Nov 2010 03:50:38 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id oAK2oaC0023163; Sat, 20 Nov 2010 03:50:36 +0100 Date: Sat, 20 Nov 2010 02:50:00 -0000 From: Jan Kratochvil To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: [RFA] .gdbinit security (revived) [incl doc] Message-ID: <20101120025036.GC10712@host0.dyn.jankratochvil.net> References: <4CE702E7.4050504@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Disposition: inline In-Reply-To: <4CE702E7.4050504@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2010-11/txt/msg00284.txt.bz2 On Sat, 20 Nov 2010 00:06:15 +0100, Keith Seitz wrote: > --- cli/cli-cmds.h 2 May 2010 23:52:14 -0000 1.16 > +++ cli/cli-cmds.h 19 Nov 2010 22:38:54 -0000 > @@ -126,7 +126,8 @@ extern void source_script (char *, int); > /* Exported to objfiles.c. */ > > extern int find_and_open_script (const char *file, int search_path, > - FILE **streamp, char **full_path); > + FILE **streamp, char **full_path, > + int from_tty); ./python/py-auto-load.c: In function ‘source_section_scripts’: ./python/py-auto-load.c:222:10: error: too few arguments to function ‘find_and_open_script’ ./cli/cli-cmds.h:128:12: note: declared here > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ testsuite/gdb.base/gdbinit.exp 19 Nov 2010 22:38:55 -0000 > +global GDB > +global GDBFLAGS > +global gdb_prompt > +global gdb_spawn_id; Redundant. > +set env(HOME) [pwd] Some other env vars from default_gdb_start are missing there. At least TERM will fix up gdb.log: -^[[?1034hGNU gdb (GDB) 7.2.50.20101120-cvs^M +GNU gdb (GDB) 7.2.50.20101120-cvs^M And there were some reason even for the others: set env(LC_CTYPE) C set env(INPUTRC) "/dev/null" set env(TERM) "vt100" > +remote_exec build "rm .gdbinit" Shouldn't be `rm -f' here? (Also for `cp' and `chmod' below.) This way it deletes src-shipped `gdb/testsuite/.gdbinit' when you run the test in the src tree. > +remote_exec build "cp $srcdir/$subdir/gdbinit.sample .gdbinit" > +gdb_expect 360 { I would prefer gdb_test_multiple "" testname (and thus also dropping the "timeout" case) > + -re "warning: file .*\.gdbinit.* is untrusted.*Read file anyway\?.*" { Backslashes should be doubled here in "..." to have the desired effect (and not considered as a regex metacharacter). > +gdb_expect 360 { gdb_test_multiple again. > + -re "warning: file.*\.gdbinit.* is untrusted.*Read file anyway\?.*" { Backslashes again. > + fail "trusted .gdbinit allowed." > + } > + -re ".*reading gdbinit.*$gdb_prompt $" { Redundant leading `.*'. Thanks, Jan