summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-gvfs.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2022-02-10 14:14:06 +0100
committerMichael Albinus <michael.albinus@gmx.de>2022-02-10 14:14:06 +0100
commit8ababad570e438d1cca88dc9afb6eb0e342483b6 (patch)
tree89095507c60b7ead877958708d8e43cea467f9cd /lisp/net/tramp-gvfs.el
parent53da8c50fca98b5a7d0418f6030181df50af8876 (diff)
downloademacs-8ababad570e438d1cca88dc9afb6eb0e342483b6.tar.gz
emacs-8ababad570e438d1cca88dc9afb6eb0e342483b6.tar.bz2
emacs-8ababad570e438d1cca88dc9afb6eb0e342483b6.zip
Improve handling of file modes in Tramp
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-get-remote-uid) (tramp-gvfs-handle-get-remote-gid): Do not assume that the default location is owned be the remote uid/gid. (tramp-gvfs-handle-file-executable-p): * lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p): Check also for setuid/setgid bit. * lisp/net/tramp.el (tramp-check-cached-permissions): Check also for ?s access type. Check whether remote uid/gid are unknown.
Diffstat (limited to 'lisp/net/tramp-gvfs.el')
-rw-r--r--lisp/net/tramp-gvfs.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index d3af9f4769a..d3634b0cc25 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1385,7 +1385,8 @@ If FILE-SYSTEM is non-nil, return file system attributes."
"Like `file-executable-p' for Tramp files."
(with-parsed-tramp-file-name filename nil
(with-tramp-file-property v localname "file-executable-p"
- (tramp-check-cached-permissions v ?x))))
+ (or (tramp-check-cached-permissions v ?x)
+ (tramp-check-cached-permissions v ?s)))))
(defun tramp-gvfs-handle-file-name-all-completions (filename directory)
"Like `file-name-all-completions' for Tramp files."
@@ -1603,8 +1604,7 @@ ID-FORMAT valid values are `string' and `integer'."
(tramp-file-name-user vec)
(when-let ((localname
(tramp-get-connection-property
- (tramp-get-process vec) "share"
- (tramp-get-connection-property vec "default-location" nil))))
+ (tramp-get-process vec) "share" nil)))
(file-attribute-user-id
(file-attributes (tramp-make-tramp-file-name vec localname) id-format)))))
@@ -1613,8 +1613,7 @@ ID-FORMAT valid values are `string' and `integer'."
ID-FORMAT valid values are `string' and `integer'."
(when-let ((localname
(tramp-get-connection-property
- (tramp-get-process vec) "share"
- (tramp-get-connection-property vec "default-location" nil))))
+ (tramp-get-process vec) "share" nil)))
(file-attribute-group-id
(file-attributes (tramp-make-tramp-file-name vec localname) id-format))))