From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#34180: 27.0.50; argv[0] used incorrectly to find the .pdmp Date: Sat, 26 Jan 2019 19:54:29 -0800 Message-ID: <5d5d6da7-d0d4-82ae-8034-78d47a6b12c8@dancol.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="64280"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 To: Stefan Monnier , 34180@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 27 04:55:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnbXL-000GZv-J1 for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Jan 2019 04:55:11 +0100 Original-Received: from localhost ([127.0.0.1]:39072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnbXK-0006C5-EP for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Jan 2019 22:55:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnbXE-0006C0-3U for bug-gnu-emacs@gnu.org; Sat, 26 Jan 2019 22:55:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnbXD-0003ME-F3 for bug-gnu-emacs@gnu.org; Sat, 26 Jan 2019 22:55:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47633) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gnbXB-0003LE-Od for bug-gnu-emacs@gnu.org; Sat, 26 Jan 2019 22:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gnbXB-0005CJ-J7 for bug-gnu-emacs@gnu.org; Sat, 26 Jan 2019 22:55:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Jan 2019 03:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34180 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: security Original-Received: via spool by 34180-submit@debbugs.gnu.org id=B34180.154856128119953 (code B ref 34180); Sun, 27 Jan 2019 03:55:01 +0000 Original-Received: (at 34180) by debbugs.gnu.org; 27 Jan 2019 03:54:41 +0000 Original-Received: from localhost ([127.0.0.1]:46914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gnbWq-0005Bl-JK for submit@debbugs.gnu.org; Sat, 26 Jan 2019 22:54:40 -0500 Original-Received: from dancol.org ([96.126.100.184]:57004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gnbWo-0005Bc-FY for 34180@debbugs.gnu.org; Sat, 26 Jan 2019 22:54:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject; bh=Wp5R+oV0O3XOGeF47vH0f95wkXAVnsmPC1h+vzEeJoA=; b=C1wFREf91eGRQg/qkRMhbruKOD19zN+KlenEE+Fj2OKW8ZBzqYQf/gHkD2vKLD2G0UZDkmBa4c5AkIKHW9FfhH+ZGudglOLjjjP2+Ray34j3Kyc9GS+QCsxGeEh1fKyXN+ZqNYyVLCf1P9r83Nte+CfEBggP9qoqKDLF3WrbR7P55deNPpu7/QvB7uz4IMIrOnk6mtgehopca5890d2vgAX8Y+am9WzRsqTef2slJhnyCQUCcwoE5SG18pgK9l+huGQEmudYz6JWQch19uvTJHqxM/mtMxY4XAtv+bSCfEHEStaovCVnjhvoEYKf9MPFuFEz+3B2qUSeL9mD08htCg==; Original-Received: from [2604:4080:1321:9a00:f455:12b4:e650:5d75] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1gnbWm-000302-6Z; Sat, 26 Jan 2019 19:54:36 -0800 In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154808 Archived-At: On 1/23/19 8:07 AM, Stefan Monnier wrote: > Package: Emacs > Version: 27.0.50 > > > Currently, the first .pdmp file that we try to load is found by adding > ".pdmp" to argv[0]. > This has 2 problems: > > 1- It fails miserably if argv[0] is a name relative to $PATH since it > performs the lookup relative to $PWD instead, which is additionally > a security issue. > > 2- If the executable named by argv[0] is a symlink, it does not try to > follow the symlink in case the .pdmp is stored next to the > destination rather than next to the source. Yep. We should definitely fix that. realpath on argv[0] seems like the right thing.