GNU bug report logs - #27169
eshell/sudo doesn't work with protected directories

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Yegor Timoshenko <yegortimoshenko@HIDDEN>; Keywords: unreproducible; merged with #27168; dated Wed, 31 May 2017 16:49:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) unreproducible; removed tag(s) patch. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at 27169 <at> debbugs.gnu.org:


Received: (at 27169) by debbugs.gnu.org; 9 Jun 2017 00:47:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 08 20:47:37 2017
Received: from localhost ([127.0.0.1]:35636 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dJ85Q-0000j7-VK
	for submit <at> debbugs.gnu.org; Thu, 08 Jun 2017 20:47:37 -0400
Received: from mail-io0-f176.google.com ([209.85.223.176]:36359)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1dJ85O-0000ir-TM
 for 27169 <at> debbugs.gnu.org; Thu, 08 Jun 2017 20:47:35 -0400
Received: by mail-io0-f176.google.com with SMTP id y77so27245740ioe.3
 for <27169 <at> debbugs.gnu.org>; Thu, 08 Jun 2017 17:47:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date
 :message-id:mime-version;
 bh=N4VvlhvYtlVTZf5qYhTECrCHrpRF1BrnhHe3506fUvc=;
 b=MB0YbhRJ8Y58qbHNNvcgG8ZuelYfwZnepTXWNKimMSNoaM9OJSGoH/fgXDdKqYW7t9
 r3O7X/FuywMcTd6qf9xDl7Vy8rQsgDqyaxkFK0VhYnw3kyAkrsVOx3fvAo7qZj7+0l9h
 G2h3iAk514aXH3xpZVh/hnxgFtIDC728T15dr8TrvpZtFLRI6xcU2ydQR6exXo8wvWRg
 +kuvy3CiZtwdBgwSGvGCUbpmxP35Vf7UcxVyifi3ahdQUdmDd7rW9uV+e09o5b+SB1gq
 Ass8wpJN///V/MUnYdIol1Kj1BWWd08jT1ausqo5QBgd8AkSx9w5/ZWUqdxSjLD2+Tz5
 VAQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references
 :user-agent:date:message-id:mime-version;
 bh=N4VvlhvYtlVTZf5qYhTECrCHrpRF1BrnhHe3506fUvc=;
 b=uhKE6Ab5rY11l0RR1aYOG/UH8gFYwiZCQbnzezI0nLzImfhNJTv3CVH9nV6pf8rxty
 72UqbwIBPF9nP99flHHX+P0yMLMQoItnOzefHP+j6sa34biYi10Fjsc+rYmd0P0IlOYQ
 WHAMUGOSUHcWWozzKXF7Zrba3btvAGcZFZeo9xZCe9duyENyvs0DForkwS5WKfsntk/n
 f+/VHxpyojbnnr+VzwW9XZirl1vdfthfmFdayZZ0ICdi69VBlmGOZIOLenu9Ku9rUk15
 lGC/EJViCSDwQag84efvsWkA7Dx9zRUDA3+zLO5QPGsE2S/HvNrQIhfQnZFLwgs7J8Ms
 zotg==
X-Gm-Message-State: AODbwcBmii+V4b7tsPETVhS/bFDJF1yPTeoje3RziuxCFDv9o7ZKXFbC
 F+TXkc1AfsWi+meZ
X-Received: by 10.107.169.17 with SMTP id s17mr39099879ioe.1.1496969249039;
 Thu, 08 Jun 2017 17:47:29 -0700 (PDT)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id u4sm419794itu.1.2017.06.08.17.47.28
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Thu, 08 Jun 2017 17:47:28 -0700 (PDT)
From: npostavs@HIDDEN
To: Yegor Timoshenko <yegortimoshenko@HIDDEN>
Subject: Re: bug#27169: eshell/sudo doesn't work with protected directories
In-Reply-To: <565849C0-5191-4FD9-A012-0FA9237B89CA@HIDDEN> (Yegor
 Timoshenko's message of "Fri, 9 Jun 2017 01:21:05 +0300")
References: <D3B4F1DA-119B-4C05-8EF5-DC5A95C42664@HIDDEN>
 <87bmq0x8bm.fsf@HIDDEN>
 <9B3DCDF4-DA3C-40CB-B5E6-61FD2BB6DEC8@HIDDEN>
 <92D4739F-7FCF-4658-B0C0-D20CEB863150@HIDDEN>
 <8760g7xpxs.fsf@HIDDEN>
 <565849C0-5191-4FD9-A012-0FA9237B89CA@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)
Date: Thu, 08 Jun 2017 20:49:01 -0400
Message-ID: <87poeevvcy.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: 27169
Cc: 27169 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.1 (/)

Yegor Timoshenko <yegortimoshenko@HIDDEN> writes:

>> Don't you also need (push 'eshell-tramp eshell-modules-list)?
>
> I never did that and it seemed to work fine (I had to manually alias
> sudo to eshell/sudo, though).

Aha, that explains it.

>> Does this work from M-x shell?
>
> No, this one is specific to eshell (actually, to em-tramp
> eshell/sudo).

So by "No" you mean "Yes" (it works)? ;)

>> Does C-x C-f /sudo::/tmp/a/ work?
>
> It works.
>
>> Does it make a difference if you run from the terminal vs running
>> graphically (there's at least one macOS bug where this makes a
>> difference, #21573).
>
> It is reproducible both in graphical and terminal environments.

Hmm, if you step through eshell-plain-command does it call
eshell-lisp-command or eshell-external-command to run "ls"?  (for me it
goes through eshell-lisp-command)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27169; Package emacs. Full text available.

Message received at 27169 <at> debbugs.gnu.org:


Received: (at 27169) by debbugs.gnu.org; 8 Jun 2017 22:21:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 08 18:21:14 2017
Received: from localhost ([127.0.0.1]:35584 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dJ5nm-0005vn-NK
	for submit <at> debbugs.gnu.org; Thu, 08 Jun 2017 18:21:14 -0400
Received: from mail-lf0-f50.google.com ([209.85.215.50]:35216)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yegortimoshenko@HIDDEN>) id 1dJ5nl-0005va-7G
 for 27169 <at> debbugs.gnu.org; Thu, 08 Jun 2017 18:21:13 -0400
Received: by mail-lf0-f50.google.com with SMTP id p189so23285670lfe.2
 for <27169 <at> debbugs.gnu.org>; Thu, 08 Jun 2017 15:21:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=WsBelTAyhy7tPOvqvIGnTZXW8uT4DZRXLYwssawjLXA=;
 b=V/l32wLhpJ+SUaGJA5J6HJ7ptLsSGTkJb/kcCkbgiXDcjkasggSDjlcOAU4alRpPMY
 sZ2J0y4tt1rxxSyZ04tgYHoXj15r+EY6NzjoPvhg/UiICahEAwJn6e5l17E2kF7ttyoB
 XWEc/yATZcdNLTi6tRdjvwYzOv+PQnLWqacEVUtEGZV5j3szUrfTyCk7d8YVMxReV3bc
 zZHsCxEc0PesUo38x8vA+96eV/OVzoEqEtaLRk0tKe1Zl5vXDQwyKt8cWZOnRtdQvEcY
 JR91e9mLANYmXI+qb+P11bB3nsv0NeMtwJgRTpCAuDvjjsCZU6EfnCbG/LxA3Au7bo+7
 lBeA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=WsBelTAyhy7tPOvqvIGnTZXW8uT4DZRXLYwssawjLXA=;
 b=QRCOoz5wm0tqJOgLzKEYfET2wXlkOgXQNCu9TamK1JvUUMG9pnDCjsZwqIjpHXwrkt
 Sw4gMPWnwyRE4/eGlAQhH4SDBfy4/9Wc7PdsZPkyfX7B0DFuIY/e4v4dmIhpQetWInLe
 dCx6xv4Qh4Ly/kKpDumoflbfKwXX+ise8YcPbjuAXGx6gisL4XxqwyN54neGAclrVUp9
 UisfsXhOewid5EFZUaQPXAdHBGrHF9I4d5VZ3KNP5xo8r5EEaBOydU2NXquqdPZOsdGN
 l7eoZ6Y2wi08XR+kkS7ijtZGs9Z1uA7AGZ/7IVtBNqoLCuZUPNciE48fsJIkC4Uc5VCV
 YCeQ==
X-Gm-Message-State: AODbwcDzmW1NQ9a33Xcoa0XX4TibZwbtuwbd15H1jslt0PQos5byhJXT
 5x7TY/MK8/yufg==
X-Received: by 10.46.83.11 with SMTP id h11mr12170101ljb.17.1496960467338;
 Thu, 08 Jun 2017 15:21:07 -0700 (PDT)
Received: from [192.168.1.66] ([94.29.13.166])
 by smtp.gmail.com with ESMTPSA id 139sm1313869ljj.16.2017.06.08.15.21.06
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 08 Jun 2017 15:21:06 -0700 (PDT)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject: Re: bug#27169: eshell/sudo doesn't work with protected directories
From: Yegor Timoshenko <yegortimoshenko@HIDDEN>
In-Reply-To: <8760g7xpxs.fsf@HIDDEN>
Date: Fri, 9 Jun 2017 01:21:05 +0300
Content-Transfer-Encoding: 7bit
Message-Id: <565849C0-5191-4FD9-A012-0FA9237B89CA@HIDDEN>
References: <D3B4F1DA-119B-4C05-8EF5-DC5A95C42664@HIDDEN>
 <87bmq0x8bm.fsf@HIDDEN>
 <9B3DCDF4-DA3C-40CB-B5E6-61FD2BB6DEC8@HIDDEN>
 <92D4739F-7FCF-4658-B0C0-D20CEB863150@HIDDEN>
 <8760g7xpxs.fsf@HIDDEN>
To: npostavs@HIDDEN
X-Mailer: Apple Mail (2.3273)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 27169
Cc: 27169 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

> Don't you also need (push 'eshell-tramp eshell-modules-list)?

I never did that and it seemed to work fine (I had to manually alias
sudo to eshell/sudo, though). Hopefully this will fix some other
problems with eshell I had recently, but adding 'eshell-tramp to
eshell-modules-list didn't resolve the issue.

> Does this work from M-x shell?

No, this one is specific to eshell (actually, to em-tramp eshell/sudo).

> Does C-x C-f /sudo::/tmp/a/ work?

It works.

> Does it make a difference if you run from the terminal vs running
> graphically (there's at least one macOS bug where this makes a
> difference, #21573).

It is reproducible both in graphical and terminal environments.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27169; Package emacs. Full text available.

Message received at 27169 <at> debbugs.gnu.org:


Received: (at 27169) by debbugs.gnu.org; 8 Jun 2017 00:49:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 07 20:49:26 2017
Received: from localhost ([127.0.0.1]:33849 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dIlde-0001aw-5Q
	for submit <at> debbugs.gnu.org; Wed, 07 Jun 2017 20:49:26 -0400
Received: from mail-it0-f53.google.com ([209.85.214.53]:35294)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1dIldc-0001ai-LI
 for 27169 <at> debbugs.gnu.org; Wed, 07 Jun 2017 20:49:25 -0400
Received: by mail-it0-f53.google.com with SMTP id m62so118480222itc.0
 for <27169 <at> debbugs.gnu.org>; Wed, 07 Jun 2017 17:49:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=i/sPJadjJXFishrdgom/mEUoVJUMxMyM+YvrF/9y4Mg=;
 b=cnJ+kVG+uATgIFmt0eMpGlVyG/BWIIJGbsOxcRXhxDoIBpZ6fkA+e19jd5m+5Dh906
 h8XM0MmHJZjz/RuW3AB7FPqAY62I4oOaUx/OoYncU8xQ0RdntRDxOogRUIP0CEhdygNw
 DWdv1t5wKgRS3jRxE5hIHWv6gEX7Wi1IrObv4h0Bab7wMSwlq4SsCQWN/4nSdM9hZnH6
 pI6lbdj/NEoYSxhViev5FM1G75pt70TQ/C4+4YBBl+v5k0DcqbSDdYN7qDejTd9VAOhX
 zOQjPgrC52BbtXobGiAVdGVQPVXqwD9QOmJBNElHRA0+wJgdUTG02ZZQRu5/ORH3OiZj
 7mXw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=i/sPJadjJXFishrdgom/mEUoVJUMxMyM+YvrF/9y4Mg=;
 b=tdbX9kDXlAMOvRUPUK3AgBqMJXolfLPvFnYZ7zY1ZowaNm6QWHr95QDWowSBstoVag
 C+XQ+6xjA0A3MxRJe5YTc8koeGttK2Ihz9M+S4c9Aq6ZJ7tLoJv08LBBoNPIVV8pRpnY
 IbixWzwDxVSXOKc3suSlyx6LkxojinwwE+bSb6mvtDkXzSAQymHf0nD3qVq8jEvLiN0A
 8hN89B+39W7umrxtdc22JKXr6+Xx+oMS7f+lVGsXm63oNw93yS7kumU5aM3rxZl383Vy
 b37cMaq93FZewCbdFeng9xNuOUDGaPNhf17znTZhueXig1jPyLp9SA6Y7YDsd0Ba6GQO
 ndgQ==
X-Gm-Message-State: AODbwcBp3SoQgZ1f1p05/pX9lU3yJWfQTiEwft9JhAFutsUZxZqBdxOC
 OAtKpzferrviHhQ1
X-Received: by 10.36.37.17 with SMTP id g17mr2950545itg.93.1496882958937;
 Wed, 07 Jun 2017 17:49:18 -0700 (PDT)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id y40sm11560484ita.2.2017.06.07.17.49.16
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 07 Jun 2017 17:49:17 -0700 (PDT)
From: npostavs@HIDDEN
To: Yegor Timoshenko <yegortimoshenko@HIDDEN>
Subject: Re: bug#27169: eshell/sudo doesn't work with protected directories
References: <D3B4F1DA-119B-4C05-8EF5-DC5A95C42664@HIDDEN>
 <87bmq0x8bm.fsf@HIDDEN>
 <9B3DCDF4-DA3C-40CB-B5E6-61FD2BB6DEC8@HIDDEN>
 <92D4739F-7FCF-4658-B0C0-D20CEB863150@HIDDEN>
Date: Wed, 07 Jun 2017 20:50:55 -0400
In-Reply-To: <92D4739F-7FCF-4658-B0C0-D20CEB863150@HIDDEN> (Yegor
 Timoshenko's message of "Wed, 7 Jun 2017 21:43:18 +0300")
Message-ID: <8760g7xpxs.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: Yegor Timoshenko <yegortimoshenko@HIDDEN> writes: >> Works
 for me, can you reproduce this from 'emacs -Q'? What Emacs >> version are
 you using? > > GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21
 Version 10.9.5 (Build 13F1911)) of 2017-04-21 > > Yes, it's reproducible
 with -Q flag,
 provided that you execute (require 'em-tramp) in *scratch* buffer.
 [...] Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at http://www.dnswl.org/, low
 trust [209.85.214.53 listed in list.dnswl.org]
 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
 (npostavs[at]gmail.com)
 -0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [209.85.214.53 listed in wl.mailspike.net]
 1.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
 domains are different
 -0.0 SPF_PASS               SPF: sender matches SPF record
 1.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom
 freemail headers are different
 0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid
 -0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 27169
Cc: 27169 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Yegor Timoshenko <yegortimoshenko@HIDDEN> writes: >> Works
    for me, can you reproduce this from 'emacs -Q'? What Emacs >> version are
    you using? > > GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21
    Version 10.9.5 (Build 13F1911)) of 2017-04-21 > > Yes, it's reproducible
   with -Q flag, provided that you execute (require 'em-tramp) in *scratch* buffer.
    [...] 
 
 Content analysis details:   (1.3 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at http://www.dnswl.org/, low
                             trust
                             [209.85.214.53 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
                             [209.85.214.53 listed in wl.mailspike.net]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail provider
                             (npostavs[at]gmail.com)
  1.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
                             domains are different
 -0.0 SPF_PASS               SPF: sender matches SPF record
  1.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom
                              freemail headers are different
  0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid
 -0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders

Yegor Timoshenko <yegortimoshenko@HIDDEN> writes:

>> Works for me, can you reproduce this from 'emacs -Q'?  What Emacs
>> version are you using?
>
> GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911)) of 2017-04-21
>
> Yes, it's reproducible with -Q flag, provided that you execute (require 'em-tramp) in *scratch* buffer.

Don't you also need (push 'eshell-tramp eshell-modules-list)?

Once I do that, I'm able to reproduce #27167, but not this bug:

    ~/src $ sudo /bin/cat foo
    /sudo:root@localhost:/home/npostavs/src/bin/cat: command not found
    ~/src $ cd /tmp
    /tmp $ sudo ls a/b
    a/b

> I believe it can be a platform-specific bug (I use macOS).

Possible.  Does this work from M-x shell?  Does C-x C-f /sudo::/tmp/a/
work?  Does it make a difference if you run from the terminal vs running
graphically (there's at least one macOS bug where this makes a
difference, #21573).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27169; Package emacs. Full text available.
Added tag(s) patch; removed tag(s) unreproducible. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at 27169 <at> debbugs.gnu.org:


Received: (at 27169) by debbugs.gnu.org; 8 Jun 2017 00:19:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 07 20:19:34 2017
Received: from localhost ([127.0.0.1]:33804 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dIlAk-0007TH-Bo
	for submit <at> debbugs.gnu.org; Wed, 07 Jun 2017 20:19:34 -0400
Received: from mail-it0-f41.google.com ([209.85.214.41]:37342)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1dIlAi-0007Sx-D6; Wed, 07 Jun 2017 20:19:32 -0400
Received: by mail-it0-f41.google.com with SMTP id m47so13504054iti.0;
 Wed, 07 Jun 2017 17:19:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=fwwrptbHSH+DZn6XGXFURUtTTzZY6xeEtpSuvEjwYp4=;
 b=DWPB90bGL2us7K/qUnMy1/V59nMZDMJb2jLun7NP1rOR61O9Lcfq4WTa0+yPLRECsm
 FsRln7KZlUHmyjRKv/Ts/P+WnjzDureLIXzjgS4UypYHsqe41T+m4eqiffxmdsYzOdqv
 M1+xrESnipHAAuNZ9XIHNc5VUgz9779r19rC+Rkp4E+bWLqzTa7vfhYBshkcHT5eJ9IO
 QtejzY2gRc2OsxkKKYa2B1dXaDl+x3I8MB56yzFtM9Twc525HuF1S4TWGkOEdwkckDe5
 ZtixbKLIsmnU68zvg+v7oVAH+3UfvM0JO56ahTRlgSO3M2k8Vo2inmZRaaFmJw48HQFa
 3Caw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=fwwrptbHSH+DZn6XGXFURUtTTzZY6xeEtpSuvEjwYp4=;
 b=PewoFEenVch6s8lxIiGjcTqb1TMHR7b+PbsBEH5PunQ+/mVxrG4y2v/x9RncqPj8gL
 70AB1bZ15WF5OKLSB3lKjx6Zj1IH0SwS5y2kBbR7S1jS8eoM59qyy74mYJ0nQdZJdRc6
 PQwMr0cELvCo8gtW61ENLLbQEZbO3bi/B0IDr2dTeJapeexPKR0Hi0kMK5YonQ/1aIlJ
 PinWPr37Wsfhtk5jNwq+H12QiyyrdnoJ5k8TqRUzTtee38XvqlBWD3DHCV54ciijOesl
 QthFQssXXV/0JAKdwUiU82GYi5vZJfOzG6rAfkZclUuvWNLUWpb/p8J+1o+BdFMK56to
 hUvA==
X-Gm-Message-State: AODbwcCHnt6E8PN+/EiXg+iLJ/LrNWDSlL3vvRStvWFLsxSKpV5vd/cL
 kCk+8nWnxlskaEjE
X-Received: by 10.36.193.66 with SMTP id e63mr2947507itg.86.1496881166750;
 Wed, 07 Jun 2017 17:19:26 -0700 (PDT)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id 76sm1723731itx.7.2017.06.07.17.19.25
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 07 Jun 2017 17:19:25 -0700 (PDT)
From: npostavs@HIDDEN
To: Yegor Timoshenko <yegortimoshenko@HIDDEN>
Subject: Re: bug#27169: eshell/sudo doesn't work with protected directories
References: <D3B4F1DA-119B-4C05-8EF5-DC5A95C42664@HIDDEN>
 <87bmq0x8bm.fsf@HIDDEN>
 <9B3DCDF4-DA3C-40CB-B5E6-61FD2BB6DEC8@HIDDEN>
 <92D4739F-7FCF-4658-B0C0-D20CEB863150@HIDDEN>
Date: Wed, 07 Jun 2017 20:20:47 -0400
In-Reply-To: <92D4739F-7FCF-4658-B0C0-D20CEB863150@HIDDEN> (Yegor
 Timoshenko's message of "Wed, 7 Jun 2017 21:43:18 +0300")
Message-ID: <878tl3xrc0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: tags 27169 = patch quit Yegor Timoshenko
 <yegortimoshenko@HIDDEN>
 writes: > GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21
 Version 10.9.5 (Build 13F1911)) of 2017-04-21 > > Yes, it's reproducible with
 -Q flag, provided that you execute (require 'em-tramp) in *scratch* buffer.
 [...] Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
 (npostavs[at]gmail.com)
 1.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
 domains are different
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [209.85.214.41 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [209.85.214.41 listed in wl.mailspike.net]
 1.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom
 freemail headers are different
 0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid
 -0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 27169
Cc: 27169 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  tags 27169 = patch quit Yegor Timoshenko <yegortimoshenko@HIDDEN>
    writes: > GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21
   Version 10.9.5 (Build 13F1911)) of 2017-04-21 > > Yes, it's reproducible with
    -Q flag, provided that you execute (require 'em-tramp) in *scratch* buffer.
    [...] 
 
 Content analysis details:   (2.0 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
                             trust
                             [209.85.214.41 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
                             [209.85.214.41 listed in wl.mailspike.net]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail provider
                             (npostavs[at]gmail.com)
  1.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
                             domains are different
 -0.0 SPF_PASS               SPF: sender matches SPF record
  1.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom
                              freemail headers are different
  0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid
 -0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders

--=-=-=
Content-Type: text/plain

tags 27169 = patch
quit

Yegor Timoshenko <yegortimoshenko@HIDDEN> writes:

> GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911)) of 2017-04-21
>
> Yes, it's reproducible with -Q flag, provided that you execute (require 'em-tramp) in *scratch* buffer.

Hmm, for some reason that doesn't work for me (possibly another bug),
but if I use 'eshell/sudo' instead of plain 'sudo' I can reproduce your problem.

The following fixes it:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=v1-0001-Let-eshell-sudo-handle-absolute-command-names-Bug.patch
Content-Description: patch

From e3d96af45b85a9ed9b96a12cae3e68eb21a2de47 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@HIDDEN>
Date: Wed, 7 Jun 2017 18:48:39 -0400
Subject: [PATCH v1] Let eshell/sudo handle absolute command names (Bug#27167)

* lisp/eshell/esh-ext.el (eshell-find-interpreter): Don't change
absolute paths into relative ones.
---
 lisp/eshell/esh-ext.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el
index fb1fedc9c5..2a495225dc 100644
--- a/lisp/eshell/esh-ext.el
+++ b/lisp/eshell/esh-ext.el
@@ -299,11 +299,13 @@ (defun eshell-find-interpreter (file args &optional no-examine-p)
       (let ((fullname (if (file-name-directory file) file
 			(eshell-search-path file)))
 	    (suffixes eshell-binary-suffixes))
-	(if (and fullname
-		 (not (file-remote-p fullname))
-		 (file-remote-p default-directory))
-	    (setq fullname (expand-file-name
-			    (concat "./" fullname) default-directory)))
+	(when (and fullname
+                   (not (file-remote-p fullname))
+                   (file-remote-p default-directory))
+          (setq fullname
+                (if (file-name-absolute-p fullname)
+                    (concat (file-remote-p default-directory) fullname)
+                  (expand-file-name fullname default-directory))))
 	(if (and fullname (not (or eshell-force-execution
 				   (file-executable-p fullname))))
 	    (while suffixes
-- 
2.11.1


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27169; Package emacs. Full text available.

Message received at 27169 <at> debbugs.gnu.org:


Received: (at 27169) by debbugs.gnu.org; 7 Jun 2017 18:43:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 07 14:43:27 2017
Received: from localhost ([127.0.0.1]:33542 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dIfvT-0006DZ-H5
	for submit <at> debbugs.gnu.org; Wed, 07 Jun 2017 14:43:27 -0400
Received: from mail-lf0-f66.google.com ([209.85.215.66]:33605)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yegortimoshenko@HIDDEN>) id 1dIfvR-0006DM-Ec
 for 27169 <at> debbugs.gnu.org; Wed, 07 Jun 2017 14:43:25 -0400
Received: by mail-lf0-f66.google.com with SMTP id u62so1560602lfg.0
 for <27169 <at> debbugs.gnu.org>; Wed, 07 Jun 2017 11:43:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:content-transfer-encoding:mime-version:subject:date:references
 :to:in-reply-to:message-id;
 bh=w4fY3l+pxLHGAKPr2f+ouqWMXhfHCGGXTd7KoCGdhaA=;
 b=H3S9pApoHF3WisU3BKKvWEDeU3b7/5GkZqRokoFjBbEEVWojtqu27CsNQPStRU2mG7
 9yMlqHz7x1BWPYL83lDLBB7Fe3ogkDQs5Pc2gjCFd8iEm27cRj5ZI8UEC/rp/tRJ3vK/
 P0mXSItSZlmjYB7qqYCW6PdInWqeigMYTIX64BfMKK+8vpUhtGJIKeuVknomKrrXFOBH
 36HKZx56DcJlfkVPmgJzx3a4gz2pLQ/7PKdDT9BGrSPD8lJ99vFBIw3ZPiPg3Ib4Vd76
 tKVYLMpH7wHI96CBKxRuU9yGShHTgPu8PD1v0X7BxU15/XffSv8aF8vLK0yWzTp7B5y0
 5Spg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:content-transfer-encoding:mime-version
 :subject:date:references:to:in-reply-to:message-id;
 bh=w4fY3l+pxLHGAKPr2f+ouqWMXhfHCGGXTd7KoCGdhaA=;
 b=tHiFKSLIP0b0PvSiwluv83lDh14ATLPRJng83HhPsvxeS9yjCptuB895x7ITC9UyPz
 vS+ktfIIjXCIRvBQxkQAgUs5pvbzkq3UCXOvXs/dIlGSUo1UhV8mGREEhYX+vC3Uqxgi
 GO+BHTmTwJnKF/SCqb8mJS/Fi6enXZEH4qE/tNCBoGMoa+1Mz0SJIPz3MAv5itaWMegG
 oVirL6EHNHGsmZCsTDou5oYKYt/U/cIXK+5Depy4JPaOlLQHyw+2CqyPDTUqaQNNmmDu
 0f9UGKkPRxgANCWLN+kqjTu4jLRaAEr5YyTQta4/7YCTXRVBUrjilIfNZyFXpzhkKFEG
 7WRw==
X-Gm-Message-State: AODbwcD+zDyOcq36i94MZvCjSgP3yTqlvEP2gIm5713D91QXcOVa5a2T
 qP4WegawXyhR7cCb5TSqQg==
X-Received: by 10.46.80.73 with SMTP id v9mr10018250ljd.135.1496860999542;
 Wed, 07 Jun 2017 11:43:19 -0700 (PDT)
Received: from [172.25.230.223] ([212.46.218.152])
 by smtp.gmail.com with ESMTPSA id g84sm517752ljg.61.2017.06.07.11.43.18
 for <27169 <at> debbugs.gnu.org>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 07 Jun 2017 11:43:18 -0700 (PDT)
From: Yegor Timoshenko <yegortimoshenko@HIDDEN>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject: Re: bug#27169: eshell/sudo doesn't work with protected directories
Date: Wed, 7 Jun 2017 21:43:18 +0300
References: <D3B4F1DA-119B-4C05-8EF5-DC5A95C42664@HIDDEN>
 <87bmq0x8bm.fsf@HIDDEN>
 <9B3DCDF4-DA3C-40CB-B5E6-61FD2BB6DEC8@HIDDEN>
To: 27169 <at> debbugs.gnu.org
In-Reply-To: <9B3DCDF4-DA3C-40CB-B5E6-61FD2BB6DEC8@HIDDEN>
Message-Id: <92D4739F-7FCF-4658-B0C0-D20CEB863150@HIDDEN>
X-Mailer: Apple Mail (2.3273)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 27169
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

> Works for me, can you reproduce this from 'emacs -Q'?  What Emacs
> version are you using?

GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version =
10.9.5 (Build 13F1911)) of 2017-04-21

Yes, it's reproducible with -Q flag, provided that you execute (require =
'em-tramp) in *scratch* buffer.

I believe it can be a platform-specific bug (I use macOS). Patched old =
Emacs version bundled with my system
(Emacs 22) doesn't have this bug. I've also just built Emacs 25.2 from =
scratch (using Gentoo Prefix) and tried it with
`emacs -Q` and it is still reproducible:

~ $ cd /tmp
/tmp $ sudo ls a/b
/Users/yegortimoshenko/Documents/Gentoo/bin/ls: cannot access 'a/b': =
Permission\
denied
/tmp $ emacs-version
GNU Emacs 25.2.1 (x86_64-apple-darwin16, NS appkit-1504.83 Version =
10.12.5 (Bui\
ld 16F73))
of 2017-06-07

The same applies to bug#27167.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27169; Package emacs. Full text available.
Added tag(s) unreproducible. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at 27169 <at> debbugs.gnu.org:


Received: (at 27169) by debbugs.gnu.org; 7 Jun 2017 12:57:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 07 08:57:39 2017
Received: from localhost ([127.0.0.1]:60518 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dIaWp-0000zv-DX
	for submit <at> debbugs.gnu.org; Wed, 07 Jun 2017 08:57:39 -0400
Received: from mail-it0-f50.google.com ([209.85.214.50]:38170)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1dIaWn-0000zd-Cx; Wed, 07 Jun 2017 08:57:37 -0400
Received: by mail-it0-f50.google.com with SMTP id r63so6241920itc.1;
 Wed, 07 Jun 2017 05:57:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=2v1wj+025spiEzvdmj6s7vDEMIooCGwJKF+aNmCOn1g=;
 b=XUkDbVjzssGCym6VaTOlkl/tq9QKQGachPM7/nGGYz5fsIi1A+NZkP9o+YI5zqShN7
 1yHc+H7NZSjxrwYfeIyt7KBmYb2f659J7VnGW/xZOzgEvq6kaYfjc8jl/92VWTsmgvXq
 ceCXAdEc8NOaID7QKn+v+OtKZxhvObVCySl7ttqq9JO61TjBGLEUKC+6RS57rZ7GdPhf
 wXtIms+Bq3HTyZbmSj18l91ySx7qZw8xQO/Hnqe7E2mAaParVM4OnNVK/VMDjKnFulSS
 +NWa39A6r5yQf8AtjxFdGM0EPVUsvcFHQqwQMfsvnk+B6SGKfsvbQdfocw28MxJx+vTd
 iSng==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=2v1wj+025spiEzvdmj6s7vDEMIooCGwJKF+aNmCOn1g=;
 b=ObO9GQCY7lN2orn1E3s1ENcMuG2eZulTbMWwElT94f1dkHAsoUBfScAIPvkVnLaspB
 WohCch4BB+1fEGRwplLJwgCHXrrXYPS//c8ytza2Q9tuyoxAiKWxxVGioW3AcL56bQHg
 P3GsGIyufthbgevWJO9JHXANLxYlC0XbNCsKXZeWM5uTlUZbFgnOxJmr/mX6r1YXFI14
 9Qga2LWLwkTu4nNFUiDxPH2kt4wtV7dNRCQVlVPHsfF9GXX73AS5WoFJ56LUg4mEBjsP
 E9gL586W7Ts+svnAIeEd2Z02BgZmx/ClH/MCbxz+XIjQL7kAwLVsV0VhRI38tBXuPMYf
 p81A==
X-Gm-Message-State: AODbwcA9XmIQ2IscaDZQcQgEfeI3eW0HSeyvzH38I8S/iSVAHBRxpX83
 xRqHAF5fUumLh9x9
X-Received: by 10.36.14.15 with SMTP id 15mr2545494ite.100.1496840251683;
 Wed, 07 Jun 2017 05:57:31 -0700 (PDT)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id x29sm761869ioi.14.2017.06.07.05.57.30
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 07 Jun 2017 05:57:31 -0700 (PDT)
From: npostavs@HIDDEN
To: Yegor Timoshenko <yegortimoshenko@HIDDEN>
Subject: Re: bug#27169: eshell/sudo doesn't work with protected directories
References: <D3B4F1DA-119B-4C05-8EF5-DC5A95C42664@HIDDEN>
Date: Wed, 07 Jun 2017 08:59:09 -0400
In-Reply-To: <D3B4F1DA-119B-4C05-8EF5-DC5A95C42664@HIDDEN> (Yegor
 Timoshenko's message of "Wed, 31 May 2017 19:47:04 +0300")
Message-ID: <87bmq0x8bm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: tags 27169 unreproducible quit Yegor Timoshenko
 <yegortimoshenko@HIDDEN>
 writes: > Expected output: > > b > > Instead I get: > > /bin/ls: cannot open
 directory 'a': Permission denied > > sudo cat a/b, etc. also don't work.
 I've found this problem while trying to cat my /etc/sudoers file: > > $ sudo
 cat /etc/sudoers > Opening input file: Permission denied, /etc/sudoers [...]
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at http://www.dnswl.org/, low
 trust [209.85.214.50 listed in list.dnswl.org]
 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
 (npostavs[at]gmail.com)
 -0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [209.85.214.50 listed in wl.mailspike.net]
 1.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
 domains are different
 -0.0 SPF_PASS               SPF: sender matches SPF record
 1.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom
 freemail headers are different
 0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid
 -0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 27169
Cc: 27169 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  tags 27169 unreproducible quit Yegor Timoshenko <yegortimoshenko@HIDDEN>
    writes: > Expected output: > > b > > Instead I get: > > /bin/ls: cannot open
    directory 'a': Permission denied > > sudo cat a/b, etc. also don't work.
   I've found this problem while trying to cat my /etc/sudoers file: > > $ sudo
    cat /etc/sudoers > Opening input file: Permission denied, /etc/sudoers [...]
    
 
 Content analysis details:   (1.3 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at http://www.dnswl.org/, low
                             trust
                             [209.85.214.50 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
                             [209.85.214.50 listed in wl.mailspike.net]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail provider
                             (npostavs[at]gmail.com)
  1.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
                             domains are different
 -0.0 SPF_PASS               SPF: sender matches SPF record
  1.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom
                              freemail headers are different
  0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid
 -0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders

tags 27169 unreproducible
quit

Yegor Timoshenko <yegortimoshenko@HIDDEN> writes:

> Expected output:
>
> b
>
> Instead I get:
>
> /bin/ls: cannot open directory 'a': Permission denied
>
> sudo cat a/b, etc. also don't work. I've found this problem while trying to cat my /etc/sudoers file:
>
> $ sudo cat /etc/sudoers
> Opening input file: Permission denied, /etc/sudoers

Works for me, can you reproduce this from 'emacs -Q'?  What Emacs
version are you using?

    Welcome to the Emacs shell

    ~/src $ cd /tmp
    /tmp $ mkdir a
    /tmp $ touch a/b
    /tmp $ sudo chmod 700 a
    [sudo] password for npostavs: 
    /tmp $ sudo chown root:wheel a
    [sudo] password for npostavs: 
    /tmp $ sudo ls a
    [sudo] password for npostavs: 
    b
    /tmp $ 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27169; Package emacs. Full text available.
Merged 27168 27169. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 May 2017 16:48:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 31 12:48:15 2017
Received: from localhost ([127.0.0.1]:47710 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dG6n9-0007ij-Jd
	for submit <at> debbugs.gnu.org; Wed, 31 May 2017 12:48:15 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35467)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yegortimoshenko@HIDDEN>) id 1dG6n7-0007iW-OZ
 for submit <at> debbugs.gnu.org; Wed, 31 May 2017 12:48:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <yegortimoshenko@HIDDEN>) id 1dG6n1-0001fH-T9
 for submit <at> debbugs.gnu.org; Wed, 31 May 2017 12:48:08 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:34915)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <yegortimoshenko@HIDDEN>)
 id 1dG6n1-0001fB-Pj
 for submit <at> debbugs.gnu.org; Wed, 31 May 2017 12:48:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54602)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <yegortimoshenko@HIDDEN>) id 1dG6mz-0005Jy-W0
 for bug-gnu-emacs@HIDDEN; Wed, 31 May 2017 12:48:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <yegortimoshenko@HIDDEN>) id 1dG6mw-0001XR-2E
 for bug-gnu-emacs@HIDDEN; Wed, 31 May 2017 12:48:06 -0400
Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:33303)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <yegortimoshenko@HIDDEN>)
 id 1dG6mv-0001Vr-Rx
 for bug-gnu-emacs@HIDDEN; Wed, 31 May 2017 12:48:02 -0400
Received: by mail-lf0-x243.google.com with SMTP id m18so1971988lfj.0
 for <bug-gnu-emacs@HIDDEN>; Wed, 31 May 2017 09:48:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:content-transfer-encoding:mime-version:subject:message-id:date
 :to; bh=g9jGTm4v4wJdNbrcbykdm1e1QyVFxot1tG2+zeLzlM0=;
 b=H63RwYIQx/Bk1ZZk222HnYYqcAN+lDQ9IGX9ocWygAzuyhvL5xtwyRit89Ac7QHlH1
 9TiVfrc2CdpVzUYLCxAmQZNQYHuZHg3HSJGrMvY7YcPmRe7tpzHAuW1nWShmpAIbZ4Kp
 sPjczeFaOxj3wBe7p2FfF2CYEkV1IHgdcg9J8a5iY2XKT+xNuY1/LIeT4WnTnEBDpFFg
 JPOAJCkH8aHU9fe68K733thJ/hnQhJnZnP9iZ67ROhgHkjNIT+hFp8X0MtVMy05IAh+f
 EgcWh+e5uGMDYuilLM3v2V6gEiGLTfeuygYu+K2B5CtP+kJ+rTYKaViFSgoBf0ldmunD
 U/kA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:content-transfer-encoding:mime-version
 :subject:message-id:date:to;
 bh=g9jGTm4v4wJdNbrcbykdm1e1QyVFxot1tG2+zeLzlM0=;
 b=WiNPo+yJjYjl1Gct5n8Kt6to8/O7dwl+kUGSesOf0XFoxCvHCglMdkqdkT7Y0uYdBc
 FychEoca7UzIJa9ZH9zXdidOzjuG9zOsi9QREIMw+Y+8KFh9wA9Yfy32RRH6aM3/CIkE
 648/4dEszSoYu/eT5dNytRz+xp3ongqd9MjvDO/MgSnOZZF6SWDlugVXFXn+LOLV8vW/
 wpsLpl9rDYd1baPjSnOjr0cSv8HdkD0EbUGwDmJj+hKhX6D9ABmkbaKfLAKDZLvRUzOS
 AWnLhwu/X9hrzY2uOJo/YuOHDACTBvy9dCpPUnO2fPJn9Anon3cgmj9WFPNRYa9n+vra
 qlhA==
X-Gm-Message-State: AODbwcBvo2Q34Phdvsfj2iOp937aIWRGLhAomqOFZrNvYsOib9H79ZXU
 R5kvpE7jLo4T3at+7+I=
X-Received: by 10.25.80.79 with SMTP id z15mr6763029lfj.142.1496249280316;
 Wed, 31 May 2017 09:48:00 -0700 (PDT)
Received: from [172.20.10.8] ([94.25.177.125])
 by smtp.gmail.com with ESMTPSA id u3sm3686698lja.13.2017.05.31.09.47.49
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 31 May 2017 09:47:59 -0700 (PDT)
From: Yegor Timoshenko <yegortimoshenko@HIDDEN>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject: eshell/sudo doesn't work with protected directories 
Message-Id: <D3B4F1DA-119B-4C05-8EF5-DC5A95C42664@HIDDEN>
Date: Wed, 31 May 2017 19:47:04 +0300
To: bug-gnu-emacs@HIDDEN
X-Mailer: Apple Mail (2.3273)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Example (In M-x eshell):

cd /tmp
mkdir a
touch a/b
sudo chmod 700 a
sudo chown root:wheel a
sudo ls a

Expected output:

b

Instead I get:

/bin/ls: cannot open directory 'a': Permission denied

sudo cat a/b, etc. also don't work. I've found this problem while trying =
to cat my /etc/sudoers file:

$ sudo cat /etc/sudoers
Opening input file: Permission denied, /etc/sudoers=




Acknowledgement sent to Yegor Timoshenko <yegortimoshenko@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#27169; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 11 Jun 2017 13:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.