From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#68074: eshell sudo/doas does not work for aliases Date: Thu, 11 Jan 2024 13:15:21 -0800 Message-ID: References: <31356544.8861481.1703711546895.ref@mail.yahoo.com> <31356544.8861481.1703711546895@mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18690"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68074@debbugs.gnu.org To: Stefan Kangas , Alfonso Sanchez-Beato Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 11 22:16:18 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rO2PR-0004hH-OI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Jan 2024 22:16:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rO2PF-0004SN-Mq; Thu, 11 Jan 2024 16:16:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rO2PE-0004SE-Bz for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2024 16:16:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rO2PE-0005Yh-37 for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2024 16:16:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rO2PB-0002VK-KK for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2024 16:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jan 2024 21:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68074 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68074-submit@debbugs.gnu.org id=B68074.17050077306567 (code B ref 68074); Thu, 11 Jan 2024 21:16:01 +0000 Original-Received: (at 68074) by debbugs.gnu.org; 11 Jan 2024 21:15:30 +0000 Original-Received: from localhost ([127.0.0.1]:34156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO2Of-0001h3-JT for submit@debbugs.gnu.org; Thu, 11 Jan 2024 16:15:29 -0500 Original-Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:57598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO2Ob-0001R1-U7 for 68074@debbugs.gnu.org; Thu, 11 Jan 2024 16:15:27 -0500 Original-Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-5ce07cf1e5dso3239601a12.2 for <68074@debbugs.gnu.org>; Thu, 11 Jan 2024 13:15:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705007722; x=1705612522; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=fu/jggcpqBdoIHoU263dJUedMq/KoZ69cSBOarIr17Y=; b=QYkxVLe7acHwKQhF1/49ShJ0xhYDFSua+mE1+CD3ULjp9vyo8/QTw4VnfvYa3X04/J WXHS0zhWzBjAkSXzLswTTbRXr05cdljtpRTNfHVeFlA1pr7I4A1eXNB4aH+sd1QpcNK2 K5UsC50x+4e6rS0jj5wlFJwNGOm0ocvOYRLYd4qicuS/5UFmvW7Oxmr9nfafWDpFlyA9 LMqoKHvzKg7yUNd9F0FOhv/5Zy5VmtY1EsVEKwrz1ISCv7eE5sE6xmayho1uNJaemjQJ eFObq54a+pe76M4CeCEq1ZkIOGCJw4iQSypX+e0R9Vamg6u30JVttMe7Dtu/7JKtFug1 XgZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705007722; x=1705612522; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fu/jggcpqBdoIHoU263dJUedMq/KoZ69cSBOarIr17Y=; b=g5bIVAPzKLF/yVz8PiZsThMQXVyWeUQ5kzoMaZDFkOso9gfPtd5FFG3kG7JCaXA0Pc 0Fkx/th2IsBSy5bD1G2EsCIL8or5I0FysVxM6tNs91LtKwhQo10X1bl4CyybbhNBluRw /6vKW013CWRsqDv5msDOmCu6MEqqVz6ky04FuHpLfX387mAKwDwt/Ao8vHPKXLtPZd/Q 2MUDydPtqELKDHcJIP9F4FwbTcVVNWOOXFeaYi0TB8QLhY5z2PeFeR3r/twv4QEBBqrL 1sNQ2KS8LUKIajcdA/c5v1uLHVM/O1+ULUzJ8XngjCDvTvqZmiDCVYcaDJWgBVBghiG6 1N+w== X-Gm-Message-State: AOJu0YxLW05p+ux0qV8AsuTHj2dA/UTo8ujRD+4eFRE9axdrmPOJNS6V 7jg40lwPm5rdJ7GICS2/yYg= X-Google-Smtp-Source: AGHT+IHGogIaJzPvAfepySW0wZaC7Tu9+BuotoYNnZU3zHZ3mHW6XwSG9Tw42hYpXfGF38s1Jwfq6A== X-Received: by 2002:a17:90b:4b05:b0:28c:a7cf:665c with SMTP id lx5-20020a17090b4b0500b0028ca7cf665cmr431671pjb.37.1705007722221; Thu, 11 Jan 2024 13:15:22 -0800 (PST) Original-Received: from [192.168.1.2] (076-168-148-233.res.spectrum.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id qa5-20020a17090b4fc500b0028d063e2906sm2122903pjb.1.2024.01.11.13.15.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Jan 2024 13:15:21 -0800 (PST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277962 Archived-At: On 1/11/2024 1:00 PM, Stefan Kangas wrote: > Alfonso Sanchez-Beato writes: > >> sudo/doas does not give the expected permissions when using an eshell alias: [snip] >> I have attached a patch with a possible fix. > > Jim, could you take a look at this patch please? I've been meaning to look at this in detail, but haven't had time. My gut feeling though is that we shouldn't have a special case in this code for when the alias starts with "cd". I'll have to do some testing with aliases and sudo in order to have a more-helpful answer though. At a guess, I think a better place to add code for this is likely in em-tramp.el.