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

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

bug#63221: 30.0.50; [PATCH] Eshell should get user (and group) IDs in a


From: Jim Porter
Subject: bug#63221: 30.0.50; [PATCH] Eshell should get user (and group) IDs in a connection-aware fashion
Date: Mon, 1 May 2023 22:42:53 -0700

This is sort of a continuation from bug#60722. Eshell gets the user's UID/GID in a few places, e.g. to decide when to prompt before deleting a file with "rm" (if you're root, it should prompt). However, these aren't connection-aware. That means that if you start Emacs as a normal user and then run "cd /sudo::", it doesn't recognize that you're now root, so it doesn't prompt.

Similarly, Eshell's "ls" implementation doesn't check for the connection-aware UID/username for ownership. And likewise for the "U" and "G" Eshell predicate operators.

Attached is a patch to fix this, which also adds a new utility function 'file-group-gid'. Similar to 'file-user-uid' (added in bug#60722), it's just a connection-aware version of 'group-gid'.

Attachment: 0001-Use-connection-aware-functions-when-getting-the-UID-.patch
Description: Text document


reply via email to

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