unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Alfonso Sanchez-Beato <alfonsosanchezbeato@yahoo.es>
Cc: Jim Porter <jporterbugs@gmail.com>, 68074@debbugs.gnu.org
Subject: bug#68074: eshell sudo/doas does not work for aliases
Date: Thu, 11 Jan 2024 13:00:17 -0800	[thread overview]
Message-ID: <CADwFkm=-mT9C9PLCmxE66f9_Ca8fc2DykyVg0r1qX_O-8qUd1A@mail.gmail.com> (raw)
In-Reply-To: <31356544.8861481.1703711546895@mail.yahoo.com> (Alfonso Sanchez-Beato's message of "Wed, 27 Dec 2023 21:12:26 +0000 (UTC)")

Alfonso Sanchez-Beato <alfonsosanchezbeato@yahoo.es> writes:

> sudo/doas does not give the expected permissions when using an eshell alias:
>
> When no alias has been defined:
>
> ~ $ which cp
> eshell/cp is a native-compiled Lisp function in ‘em-unix.el’.
> ~ $ touch test
> ~ $ cp test /boot/efi/
> Opening output file: Permission denied, /boot/efi/test
> ~ $ sudo cp test /boot/efi/
> ~ $ echo $?
> 0
>
> But after defining the alias:
>
> ~ $ alias cp '*cp $*'
> ~ $ which cp
> cp is an alias, defined as "*cp $*"
> ~ $ sudo cp test /boot/efi/
> /usr/bin/cp: cannot stat '/boot/efi/test': Permission denied
>
> I have attached a patch with a possible fix.

Jim, could you take a look at this patch please?





  reply	other threads:[~2024-01-11 21:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <31356544.8861481.1703711546895.ref@mail.yahoo.com>
2023-12-27 21:12 ` bug#68074: eshell sudo/doas does not work for aliases Alfonso Sanchez-Beato via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-11 21:00   ` Stefan Kangas [this message]
2024-01-11 21:15     ` Jim Porter
2024-01-25  2:43       ` Jim Porter
2024-01-26 23:53         ` Alfonso Sanchez-Beato via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-27  0:27           ` Jim Porter
2024-01-27  1:19             ` Jim Porter
2024-01-27  8:46               ` Alfonso Sanchez-Beato via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-27 20:24                 ` Jim Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkm=-mT9C9PLCmxE66f9_Ca8fc2DykyVg0r1qX_O-8qUd1A@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=68074@debbugs.gnu.org \
    --cc=alfonsosanchezbeato@yahoo.es \
    --cc=jporterbugs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).