* net/tramp-sh.el (tramp-set-file-uid-gid): Convert UID and GID to
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 29 Dec 2012 08:09:13 +0000 (00:09 -0800)
committerGlenn Morris <rgm@gnu.org>
Sat, 29 Dec 2012 08:09:13 +0000 (00:09 -0800)
integers, if they are real numbers.  (Bug#13282)

lisp/ChangeLog
lisp/net/tramp-sh.el

index f7664b6..6aabc60 100644 (file)
@@ -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",
index 340b7ad..e903708 100644 (file)
@@ -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))