From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4723 invoked by alias); 25 Sep 2012 07:02:25 -0000 Received: (qmail 4715 invoked by uid 22791); 25 Sep 2012 07:02:24 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Sep 2012 07:02:12 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B51BE1C7AEB; Tue, 25 Sep 2012 03:02:11 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id eiGaV-XJxwTt; Tue, 25 Sep 2012 03:02:11 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5A0201C770F; Tue, 25 Sep 2012 03:02:11 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C557EC6ABB; Tue, 25 Sep 2012 09:02:08 +0200 (CEST) Date: Tue, 25 Sep 2012 07:02:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: khooyp@cs.umd.edu, jan.kratochvil@redhat.com, gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] Try to initialize data-directory by first searching for "data-directory" in the same directory as the gdb binary Message-ID: <20120925070208.GB3010@adacore.com> References: <20120924152641.GF4146@adacore.com> <9F52A338-A158-44DC-90C1-F46503859613@cs.umd.edu> <285502C6-1395-4049-9D55-031EDA3AD06D@cs.umd.edu> <83haqni93s.fsf@gnu.org> <20120924204931.GA4265@adacore.com> <83d31bi0ya.fsf@gnu.org> <20120924213457.GA9671@adacore.com> <83boguipj9.fsf@gnu.org> <20120925063518.GA3010@adacore.com> <838vbyiol1.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <838vbyiol1.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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-09/txt/msg00539.txt.bz2 > That's not what I meant. I don't see how using absolute file names is > safer than using file names computed from relative file names. You're right - it's not a great deal safer than with relative file names. At least there is only one directory from which GDB is susceptible to attack. But the possibility still exists, and probably a simple "string" program can find the right location. The latest proposal of installing a copy of the share directory at the location where GDB would look for them is fairly clever that way, since it does not open a new door. And since it was proposed, I know I've seen this approach used in other projects as well. -- Joel