tramp-devel
[Top][All Lists]
Advanced

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

ls-lisp and remote files


From: Lars Hansen
Subject: ls-lisp and remote files
Date: Thu, 30 Oct 2003 21:06:44 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1

I have been working on making ls-lisp work for remote files. To do that I have made a Tramp implementation of directory-files-and-attributes using perl on the remote machine. This works fine except for the translation of UID's and GID's to names. To make this translation, ls-lisp calls user-login-name which works in the context of the local machine, and that is wrong for remote directories. Of cource one could just let ls-lisp check if the directory is remote and make no translation if it is. However, I sugest the following:

1. Add an optional parameter ID-NAMES to the lisp functions file-attributes and directory-files-and-attributes. When ID-NAMES is non-nil, UID and GID is returned as names if possible.

2. Let ls-lisp use this feature to obtain UID and GID names.

I have implemented these change on my own machine (dired.c, lisp.h, ls-lisp.el, tramp.el) and it seems to work fine.

I want to ask people what you think about this suggestion.

----------------

One more related thing.
IFAICS it is a bug that the current implementation of ls-lisp calls user-login-name to obtain group name. user-login-name calls getpwuid, but getgrgid should be used for that, I think. It might work on GNU/Linux systems but it fails on Sun systems, at least the one I have access to. On the Sun system UID's and GID's are not disjoint. With the changes I suggest above there is no need to make a lisp interface to getgrgid since the translation may be done in dired.c.





reply via email to

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