From dfbb4d511ee5b0a6234ffa393deaaaf56a2651b7 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 12 Oct 2014 20:27:37 +0200 Subject: [PATCH] * net/tramp-sh.el (tramp-get-remote-id): Check also for "gid". --- lisp/ChangeLog | 4 ++++ lisp/net/tramp-sh.el | 15 ++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f6807b9a508..2094fdc30cc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-10-12 Michael Albinus + + * net/tramp-sh.el (tramp-get-remote-id): Check also for "gid". + 2014-10-11 Jan Djärv * cus-start.el (all): Add missing ns and boolean to diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index a67ca32bbaa..65b64233e5c 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -5228,13 +5228,14 @@ Return ATTR." (with-tramp-connection-property vec "id" (tramp-message vec 5 "Finding POSIX `id' command") (catch 'id-found - (let ((dl (tramp-get-remote-path vec)) - result) - (while (and dl (setq result (tramp-find-executable vec "id" dl t t))) - ;; Check POSIX parameter. - (when (tramp-send-command-and-check vec (format "%s -u" result)) - (throw 'id-found result)) - (setq dl (cdr dl))))))) + (dolist (cmd '("id" "gid")) + (let ((dl (tramp-get-remote-path vec)) + result) + (while (and dl (setq result (tramp-find-executable vec cmd dl t t))) + ;; Check POSIX parameter. + (when (tramp-send-command-and-check vec (format "%s -u" result)) + (throw 'id-found result)) + (setq dl (cdr dl)))))))) (defun tramp-get-remote-uid-with-id (vec id-format) (tramp-send-command-and-read -- 2.39.5