summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2012-12-28 18:42:11 +0100
committerMichael Albinus <michael.albinus@gmx.de>2012-12-28 18:42:11 +0100
commitb2e45f822e55882dda1bb80ca8b845d062d6d523 (patch)
treea98d8c3c22476703ff7939f02642d65b526e8de9
parent951add3d1d984576f73bbb1e9f695c5755a0b9ac (diff)
downloademacs-lost+found/b2e45f822e55882dda1bb80ca8b845d062d6d523.tar.gz
* net/tramp-sh.el (tramp-set-file-uid-gid): Convert UID and GID tolost+found/b2e45f822e55882dda1bb80ca8b845d062d6d523
integers, if they are real numbers. (Bug#13282)
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/tramp-sh.el4
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 94e9720b86e..9585e0d18ed 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-28 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp-sh.el (tramp-set-file-uid-gid): Convert UID and GID to
+ integers, if they are real numbers. (Bug#13282)
+
2012-12-26 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-indent-beg-re): Only allow "class",
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 340b7ad353d..e903708275e 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1455,7 +1455,9 @@ and gid of the corresponding user is taken. Both parameters must be integers."
;; working with su(do)? when it is needed, so it shall succeed in
;; the majority of cases.
;; Don't modify `last-coding-system-used' by accident.
- (let ((last-coding-system-used last-coding-system-used))
+ (let ((last-coding-system-used last-coding-system-used)
+ (uid (and (numberp uid) (round uid)))
+ (gid (and (numberp gid) (round gid))))
(if (file-remote-p filename)
(with-parsed-tramp-file-name filename nil
(if (and (zerop (user-uid)) (tramp-local-host-p v))