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.




_______________________________________________
Tramp-devel mailing list
[EMAIL PROTECTED]
http://mail.nongnu.org/mailman/listinfo/tramp-devel

Reply via email to