GNU bug report logs - #63221
30.0.50; [PATCH] Eshell should get user (and group) IDs in a connection-aware fashion

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Tue, 2 May 2023 05:44:01 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: 63221 <at> debbugs.gnu.org
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
[Message part 1 (text/plain, inline)]
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'.
[0001-Use-connection-aware-functions-when-getting-the-UID-.patch (text/plain, attachment)]

This bug report was last modified 2 years and 23 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.