From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1571 invoked by alias); 22 Apr 2012 21:26:32 -0000 Received: (qmail 1561 invoked by uid 22791); 22 Apr 2012 21:26:32 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 Apr 2012 21:26:17 +0000 Received: by vbbey12 with SMTP id ey12so9406199vbb.0 for ; Sun, 22 Apr 2012 14:26:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=cIm1UG1TdmbotAyz87/sfEOwZN6lkFCMqGeYAOcasT4=; b=WfEqbIk0og/0XgZ3d/0gSTjxsAjhwY3o00pV/E2ljXIucofadv1CmTjsSSG1pvD3e8 ilOCFhdA1J9zaV1UwnD82ASt7WyZDWSwCZX7gBrlPLaS2jVpHSDNtdDDOe0OlA6CXsEJ 4hFZeE1dh+oZkZWV6BmWHqjQoALWiyX7KDKgr4Ah9iPseqrEfjJKep4UJ1dm72wh6NsX A7kghPDRrK+pOeBt/Tdbv8C5hxIXXK1O5qKdAVEFXFgvZjkRDBykeZ+uEXgejVz4QPzl JIeeQxwjJ7tOUcLmWFZIfXJuA57j9cMZYfODy5o0YqrD1iQS/mgPUukaPSWyIKlHmaSf N3/Q== Received: by 10.52.67.208 with SMTP id p16mr11234848vdt.93.1335129976967; Sun, 22 Apr 2012 14:26:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.67.208 with SMTP id p16mr11234839vdt.93.1335129976820; Sun, 22 Apr 2012 14:26:16 -0700 (PDT) Received: by 10.52.165.2 with HTTP; Sun, 22 Apr 2012 14:26:16 -0700 (PDT) In-Reply-To: <20120422165128.GA21820@host2.jankratochvil.net> References: <20120422165128.GA21820@host2.jankratochvil.net> Date: Mon, 23 Apr 2012 02:38:00 -0000 Message-ID: Subject: Re: [patch] auto-load safe-path reset back by set "" From: Doug Evans To: Jan Kratochvil Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQl4OTf5yFOdPMbDdHW4AGZa13FCJhUiYQsQmYz8jm9PNDGZFOmUCS0Pbpo1NshQryX7pgR2xwypfXCFKFACMRAx0Q+Vug8orD+oxro9pnbXyYtdXaZ+uVAUBKbRm+6QqU4IZ7473bkUGELQRiti+Ab6e09N1g== 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: 2012-04/txt/msg00725.txt.bz2 On Sun, Apr 22, 2012 at 9:51 AM, Jan Kratochvil wrote: > Hi, > > from off-list discussion with Doug I have realized the current GDB practi= ce > is that "set var" will reset it to the factory defaults: > =A0 =A0 =A0 =A0(gdb) set libthread-db-search-path a > =A0 =A0 =A0 =A0(gdb) show libthread-db-search-path > =A0 =A0 =A0 =A0The current search path or libthread_db is "a". > =A0 =A0 =A0 =A0(gdb) set libthread-db-search-path > =A0 =A0 =A0 =A0(gdb) show libthread-db-search-path > =A0 =A0 =A0 =A0The current search path or libthread_db is "$sdir:$pdir". > > A similar behavior can be seen for the "directory" command. > > Doug's complaint was that "set auto-load safe-path" can be never reset ba= ck to > the GDB compilation settings. A thought occurred to me regarding the default value of auto-load-path =3D ${prefix}. For a typical value of /usr, it doesn't give as much protection as it could. E.g. /usr/tmp, /usr/local/tmp (or possibly anything in /usr/local). So I was wondering if we really want security to be on by default, should the default value be gdb's data-directory (e.g., $prefix/share/gdb) + $exec_prefix/lib{,32,64} + ??? Plus, it seems like at least data-directory should be relocatable. Implementing this might be cumbersome unless data-directory was represented as something like "$ddir". Or maybe represent $prefix as $pdir, etc.. There is precedent. Whether to apply that here - I'm just raising the issue, I'm not sure myself.