From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andre Spiegel Newsgroups: gmane.emacs.devel Subject: Re: [Ronan.Keryell@enstb.org: tramp sudo:: and version control on RCS root controlled files] Date: Sat, 19 Nov 2005 12:17:04 +0100 Message-ID: <1132399024.3050.90.camel@localhost> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1132402036 9825 80.91.229.2 (19 Nov 2005 12:07:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 19 Nov 2005 12:07:16 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 19 13:07:13 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EdRU6-00021F-LI for ged-emacs-devel@m.gmane.org; Sat, 19 Nov 2005 13:06:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EdRU6-0007ss-1B for ged-emacs-devel@m.gmane.org; Sat, 19 Nov 2005 07:06:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EdQiW-0001aH-PZ for emacs-devel@gnu.org; Sat, 19 Nov 2005 06:17:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EdQiT-0001Zc-VI for emacs-devel@gnu.org; Sat, 19 Nov 2005 06:17:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EdQiT-0001Z6-9F for emacs-devel@gnu.org; Sat, 19 Nov 2005 06:17:09 -0500 Original-Received: from [193.113.160.40] (helo=mail.o2.co.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EdQiS-0006Nu-BA; Sat, 19 Nov 2005 06:17:08 -0500 Original-Received: from [84.191.126.72] (84.191.126.72) by mail.o2.co.uk (7.0.045) id 4368CB3500218DBB; Sat, 19 Nov 2005 11:09:59 +0000 Original-To: rms@gnu.org In-Reply-To: X-Mailer: Evolution 2.2.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46256 Archived-At: On Sat, 2005-11-05 at 18:43 -0500, Richard Stallman wrote: > [I sent this message three times but my system did not see > a response. Did you deal with this?] Sorry for the delayed response. This is actually a more fundamental issue and I'm not sure how to proceed with this. Here is the problem statement: > When I want to modify a file owned by root and RCS controlled through the > tramp sudo:: method, Emacs think it does not have to do the check out and > triggers a steal-the-lock procedure. The problem is that VC needs to compare the name of the user holding the lock on a file to the name of the user that is running Emacs. (The RCS master file only contains the name of the locking user, no UID.) VC normally compares the name to user-login-name, but this is not correct when Tramp is involved, because the account at the end of the Tramp connection might be a different one (not just under the sudo:: method, other methods can also exhibit this behaviour). The only solution I can think of would be to have a new file-handler-sensitive operation (file-login-name FILE) which returns the name of the user under which Emacs accesses the given FILE. For local files, that would be equivalent to user-login-name, for remote files it would be the name of the remote user, or "root" if Tramp sudo:: is involved. What do you think?