[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68074: eshell sudo/doas does not work for aliases
From: |
Alfonso Sanchez-Beato |
Subject: |
bug#68074: eshell sudo/doas does not work for aliases |
Date: |
Wed, 27 Dec 2023 21:12:26 +0000 (UTC) |
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.
0001-lisp-eshell-em-alias.el-eshell-maybe-replace-by-alia.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#68074: eshell sudo/doas does not work for aliases,
Alfonso Sanchez-Beato <=