bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68074: eshell sudo/doas does not work for aliases


From: Stefan Kangas
Subject: bug#68074: eshell sudo/doas does not work for aliases
Date: Thu, 11 Jan 2024 13:00:17 -0800

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 via email to

[Prev in Thread] Current Thread [Next in Thread]