commit 1dd54e3eef7543720eff161457677a35fae2435c (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Tue Oct 11 13:06:42 2016 -0700 Work around Samba bug with ':' in symlink contents * src/filelock.c (current_lock_owner): When reading the contents of a lock, treat the UTF-8 for U+F022 as if it were ':' (Bug#24656). diff --git a/src/filelock.c b/src/filelock.c index a2e1df9..d4dfc1d 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -72,8 +72,9 @@ along with GNU Emacs. If not, see . */ /* Normally use a symbolic link to represent a lock. The strategy: to lock a file FN, create a symlink .#FN in FN's - directory, with link data `user@host.pid'. This avoids a single - mount (== failure) point for lock files. + directory, with link data USER@HOST.PID:BOOT. This avoids a single + mount (== failure) point for lock files. The :BOOT is omitted if + the boot time is not available. When the host in the lock data is the current host, we can check if the pid is valid with kill. @@ -102,13 +103,11 @@ along with GNU Emacs. If not, see . */ This is compatible with the locking scheme used by Interleaf (which has contributed this implementation for Emacs), and was designed by - Ethan Jacobson, Kimbo Mundy, and others. - - --karl@cs.umb.edu/karl@hq.ileaf.com. + Karl Berry, Ethan Jacobson, Kimbo Mundy, and others. On some file systems, notably those of MS-Windows, symbolic links - do not work well, so instead of a symlink .#FN -> 'user@host.pid', - the lock is a regular file .#FN with contents 'user@host.pid'. To + do not work well, so instead of a symlink .#FN -> USER@HOST.PID:BOOT, + the lock is a regular file .#FN with contents USER@HOST.PID:BOOT. To establish a lock, a nonce file is created and then renamed to .#FN. On MS-Windows this renaming is atomic unless the lock is forcibly acquired. On other systems the renaming is atomic if the lock is @@ -289,8 +288,8 @@ enum { MAX_LFINFO = 8 * 1024 }; typedef struct { - /* Location of '@', '.', ':' in USER. If there's no colon, COLON - points to the end of USER. */ + /* Location of '@', '.', and ':' (or equivalent) in USER. If there's + no colon or equivalent, COLON points to the end of USER. */ char *at, *dot, *colon; /* Lock file contents USER@HOST.PID with an optional :BOOT_TIME @@ -548,7 +547,7 @@ current_lock_owner (lock_info_type *owner, char *lfname) if (!dot) return -1; - /* The PID is everything from the last `.' to the `:'. */ + /* The PID is everything from the last '.' to the ':' or equivalent. */ if (! c_isdigit (dot[1])) return -1; errno = 0; @@ -556,7 +555,8 @@ current_lock_owner (lock_info_type *owner, char *lfname) if (errno == ERANGE) pid = -1; - /* After the `:', if there is one, comes the boot time. */ + /* After the ':' or equivalent, if there is one, comes the boot time. */ + char *boot = owner->colon + 1; switch (owner->colon[0]) { case 0: @@ -564,10 +564,19 @@ current_lock_owner (lock_info_type *owner, char *lfname) lfinfo_end = owner->colon; break; + case '\357': + /* Treat "\357\200\242" (U+F022 in UTF-8) as if it were ":". + This works around a bug in Samba, which can mistakenly + transliterate ':' to U+F022 in symlink contents (Bug#24656). + See . */ + if (! (boot[0] == '\200' && boot[1] == '\242')) + return -1; + boot += 2; + /* Fall through. */ case ':': - if (! c_isdigit (owner->colon[1])) + if (! c_isdigit (boot[0])) return -1; - boot_time = strtoimax (owner->colon + 1, &lfinfo_end, 10); + boot_time = strtoimax (boot, &lfinfo_end, 10); break; default: commit 5cc3c13d164e392218a4dbc277fdab8c757a91af Author: Stefan Monnier Date: Tue Oct 11 15:52:14 2016 -0400 If autoloads buffer is unchanged, mark it as such (bug#23692) * lisp/emacs-lisp/autoload.el (update-directory-autoloads): If autoloads buffer is unchanged, mark it as such (bug#23692). diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index aa58f7b..426601c 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -1112,7 +1112,8 @@ write its autoloads into the specified file instead." ;; Don't modify the file if its content has not been changed, so `make' ;; dependencies don't trigger unnecessarily. - (when changed + (if (not changed) + (set-buffer-modified-p nil) (let ((version-control 'never)) (save-buffer))) commit 8b4aebf4559522d19193cc19cc8a255e764a8676 Author: Michael Albinus Date: Tue Oct 11 16:53:33 2016 +0200 Use "26.1" version string in Tramp, fix some comments * lisp/net/tramp-gvfs.el (tramp-gvfs-methods): * lisp/net/tramp-sh.el (tramp-remote-process-environment): Use "26.1" version string. diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 0d804fc..e953170 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -118,7 +118,7 @@ Add the extension of F, if existing." (extension (file-name-extension f t))) (make-temp-file prefix dir-flag extension))) -;; `temporary-file-directory' as function is introduced with Emacs 25.2. +;; `temporary-file-directory' as function is introduced with Emacs 26.1. (defalias 'tramp-compat-temporary-file-directory-function (if (fboundp 'temporary-file-directory) 'temporary-file-directory diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 6f1c013..3d8d366 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -114,7 +114,7 @@ '("afp" "dav" "davs" "gdrive" "obex" "sftp" "synce") "List of methods for remote files, accessed with GVFS." :group 'tramp - :version "25.2" + :version "26.1" :type '(repeat (choice (const "afp") (const "dav") (const "davs") @@ -1963,10 +1963,13 @@ They are retrieved from the hal daemon." ;; * Host name completion for existing mount points (afp-server, ;; smb-server) or via smb-network. +;; ;; * Check, how two shares of the same SMB server can be mounted in ;; parallel. +;; ;; * Apply SDP on bluetooth devices, in order to filter out obex ;; capability. +;; ;; * Implement obex for other serial communication but bluetooth. ;;; tramp-gvfs.el ends here diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el index 5f9720f..b631072 100644 --- a/lisp/net/tramp-gw.el +++ b/lisp/net/tramp-gw.el @@ -331,6 +331,7 @@ password in password cache. This is done for the first try only." ;;; TODO: ;; * Provide descriptive Commentary. +;; ;; * Enable it for several gateway processes in parallel. ;;; tramp-gw.el ends here diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index a7ac060..6196b15 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -566,7 +566,7 @@ which might have been set in the init files like ~/.profile. Special handling is applied to the PATH environment, which should not be set here. Instead, it should be set via `tramp-remote-path'." :group 'tramp - :version "25.2" + :version "26.1" :type '(repeat string) :require 'tramp) diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 3b9c49e..fe24edb 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -2042,8 +2042,10 @@ Returns nil if an error message has appeared." ;;; TODO: ;; * Return more comprehensive file permission string. +;; ;; * Try to remove the inclusion of dummy "" directory. Seems to be at ;; several places, especially in `tramp-smb-handle-insert-directory'. +;; ;; * Ignore case in file names. ;;; tramp-smb.el ends here diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 44afc0a..7af40a8 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1959,7 +1959,7 @@ ARGS are the arguments OPERATION has been called with." ;; COMMAND. ((member operation '(process-file shell-command start-file-process - ;; Emacs 25.2+ only. + ;; Emacs 26+ only. make-nearby-temp-file temporary-file-directory)) default-directory) ;; PROC.