1. 09 Dec, 2017 1 commit
    • Michael Albinus's avatar
      Fix Bug#29579 · 9d9cbafc
      Michael Albinus authored
      * lisp/files.el (file-name-non-special):
      Inhibit `file-name-handler-alist' only for some operations.
      Add missing operations.  (Bug#29579)
      
      * lisp/net/tramp-compat.el (tramp-compat-file-name-quote):
      Do not quote if it is quoted already.
      
      * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
      Use `copy-tree' but `copy-sequence'.
      
      * lisp/net/tramp.el (tramp-handle-file-truename): Handle several
      trailing slashes correctly.
      
      * test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
      (tramp-test12-rename-file, tramp-test24-file-acl)
      (tramp-test25-file-selinux, tramp--test-check-files):
      Handle also quoted file names.
      (tramp-test21-file-links): Fix file name quoting test.
      (tramp-test24-file-acl): Be more robust for "smb" method.
      (tramp-test35-make-auto-save-file-name): Enable hidden test cases.
      9d9cbafc
  2. 08 Dec, 2017 1 commit
    • Michael Albinus's avatar
      Minor Tramp fixes · 7eea3144
      Michael Albinus authored
      * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
      Fix a bug when renaming.
      
      * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
      (tramp-test42-delay-load, tramp-test42-remote-load-path):
      Skip unless Emacs >= 26.
      7eea3144
  3. 06 Dec, 2017 1 commit
    • Michael Albinus's avatar
      Fix Bug#29579 · a1bbc490
      Michael Albinus authored
      * lisp/files.el (file-name-non-special):
      Inhibit `file-name-handler-alist' only for some operations.
      Add missing operations.  (Bug#29579)
      
      * lisp/net/tramp-compat.el (tramp-compat-file-name-quote):
      Do not quote if it is quoted already.
      
      * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
      Use `copy-tree' but `copy-sequence'.
      
      * lisp/net/tramp.el (tramp-handle-file-truename): Handle several
      trailing slashes correctly.
      
      * test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
      (tramp-test12-rename-file, tramp-test24-file-acl)
      (tramp-test25-file-selinux, tramp--test-check-files):
      Handle also quoted file names.
      (tramp-test21-file-links): Fix file name quoting test.
      (tramp-test24-file-acl): Be more robust for "smb" method.
      (tramp-test35-make-auto-save-file-name): Enable hidden test cases.
      a1bbc490
  4. 30 Nov, 2017 1 commit
  5. 29 Nov, 2017 1 commit
    • Michael Albinus's avatar
      Some minor Tramp corrections · 3dd25aee
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-handle-directory-file-name):
      Handle several trailing slashes correctly.
      (tramp-handle-file-selinux-context): New defun.
      
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
      Use `tramp-handle-file-selinux-context'.
      
      * test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
      Extend test.
      (tramp-test17-insert-directory): Make check more robust.
      (tramp-test42-auto-load): Combine several let forms.
      (tramp-test42-delay-load, tramp-test42-recursive-load)
      (tramp-test42-remote-load-path, tramp-test43-unload): Rename.
      3dd25aee
  6. 27 Nov, 2017 1 commit
    • Michael Albinus's avatar
      Fix Bug#29163 · 06d05fec
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-autoload-file-name-regexp):
      Do not use "\\'" in regexp.  (Bug#29163)
      (top) Do not run (tramp-register-autoload-file-name-handlers)
      when loading tramp.el.
      
      * test/lisp/net/tramp-tests.el (tramp--test-mock-p): New defun.
      (tramp-test32-environment-variables-and-port-numbers)
      (tramp-test41-asynchronous-requests): Use it.
      (tramp-test42-auto-load): New test.
      (tramp-test43-recursive-load, tramp-test44-remote-load-path)
      (tramp-test45-delay-load, tramp-test46-unload): Rename.
      06d05fec
  7. 25 Nov, 2017 1 commit
  8. 19 Nov, 2017 5 commits
  9. 18 Nov, 2017 1 commit
    • Michael Albinus's avatar
      Fix bug in tramp-handle-file-truename · c355529b
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-handle-file-truename): Expand localname.
      
      * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Check also
      relative symbolic links.
      c355529b
  10. 17 Nov, 2017 2 commits
  11. 16 Nov, 2017 1 commit
  12. 14 Nov, 2017 2 commits
    • Michael Albinus's avatar
      Fix Bug#29291 · a5ec644c
      Michael Albinus authored
      * test/lisp/net/tramp-tests.el (tramp-test24-file-acl):
      Preserve permissions when copying.  (Bug#29291)
      a5ec644c
    • Michael Albinus's avatar
      Fix Bug#2928 · 8b900e5b
      Michael Albinus authored
      * test/lisp/net/tramp-tests.el (tramp-test25-file-selinux):
      Enhance test.  (Bug#29287)
      (tramp-test44-delay-load): Fix for older Emacsen.
      8b900e5b
  13. 12 Nov, 2017 1 commit
    • Michael Albinus's avatar
      Fix Bug#29225 · 48ad0039
      Michael Albinus authored
      * src/fileio.c (Fset_file_acl): Report error only when
      acl_errno_valid returns true.  (Bug#29225)
      
      * test/lisp/net/tramp-tests.el (tramp-test24-file-acl)
      (tramp-test25-file-selinux): New tests.
      (tramp-test26-file-name-completion, tramp-test27-load)
      (tramp-test28-process-file, tramp-test29-start-file-process)
      (tramp-test30-interrupt-process, tramp-test31-shell-command)
      (tramp-test32-environment-variables)
      (tramp-test32-environment-variables-and-port-numbers)
      (tramp-test33-explicit-shell-file-name)
      (tramp-test34-vc-registered)
      (tramp-test35-make-auto-save-file-name)
      (tramp-test36-find-backup-file-name)
      (tramp-test37-make-nearby-temp-file)
      (tramp-test38-special-characters)
      (tramp-test38-special-characters-with-stat)
      (tramp-test38-special-characters-with-perl)
      (tramp-test38-special-characters-with-ls, tramp-test39-utf8)
      (tramp-test39-utf8-with-stat, tramp-test39-utf8-with-perl)
      (tramp-test39-utf8-with-ls, tramp-test40-file-system-info)
      (tramp-test41-asynchronous-requests)
      (tramp-test42-recursive-load, tramp-test43-remote-load-path)
      (tramp-test44-delay-load, tramp-test45-unload): Rename.
      48ad0039
  14. 06 Nov, 2017 1 commit
  15. 05 Nov, 2017 1 commit
    • Michael Albinus's avatar
      Do not load Tramp unless `tramp-mode' is non-nil · ca2d94ba
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-autoload-file-name-handler): Load Tramp only if
      `tramp-mode' is non-nil.
      (tramp-unload-file-name-handlers): Unload also
      `tramp-autoload-file-name-handler'.
      
      * test/lisp/net/tramp-tests.el (tramp-test42-delay-load): Extend test.
      ca2d94ba
  16. 26 Oct, 2017 1 commit
    • Michael Albinus's avatar
      Fix Bug#28959 · 646e56e1
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-handle-find-backup-file-name):
      Use `tramp-tramp-file-p' rather than `tramp-file-name-p'.  Add
      hop to backup file name.  (Bug#28959)
      
      * test/lisp/net/tramp-tests.el (tramp-test34-find-backup-file-name):
      New test.
      (tramp-test35-make-nearby-temp-file)
      (tramp-test36-special-characters)
      (tramp-test36-special-characters-with-stat)
      (tramp-test36-special-characters-with-perl)
      (tramp-test36-special-characters-with-ls, tramp-test37-utf8)
      (tramp-test37-utf8-with-stat, tramp-test37-utf8-with-perl)
      (tramp-test37-utf8-with-ls, tramp-test38-file-system-info)
      (tramp-test39-asynchronous-requests)
      (tramp-test40-recursive-load, tramp-test41-remote-load-path)
      (tramp-test42-delay-load, tramp-test43-unload): Rename.
      646e56e1
  17. 24 Oct, 2017 1 commit
  18. 23 Oct, 2017 1 commit
  19. 20 Oct, 2017 1 commit
    • Michael Albinus's avatar
      Fix Bug#28896 · b500e06f
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-handle-rename-file):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Handle FILENAME
      being a directory.  (Bug#28896)
      
      * test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
      (tramp-test12-rename-file): Test also FILENAME being a directory.
      b500e06f
  20. 19 Oct, 2017 1 commit
  21. 10 Oct, 2017 1 commit
  22. 08 Oct, 2017 1 commit
  23. 03 Oct, 2017 1 commit
    • Michael Albinus's avatar
      Add support for `file-system-info' in Tramp · a9ac20c1
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-file-name-for-operation):
      Add `file-system-info'.
      
      * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info): New defun.
      (tramp-adb-file-name-handler-alist): Use it.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-system-attributes)
      (tramp-gvfs-file-system-attributes-regexp): New defconst.
      (tramp-gvfs-handle-file-system-info): New defun.
      (tramp-gvfs-file-name-handler-alist): Use it.
      (tramp-gvfs-get-directory-attributes): Fix property name.
      (tramp-gvfs-get-root-attributes): Support also file system attributes.
      
      * lisp/net/tramp-sh.el (tramp-sh-handle-file-system-info): New defun.
      (tramp-sh-file-name-handler-alist): Use it.
      (tramp-sh-handle-insert-directory): Insert size information.
      (tramp-get-remote-df): New defun.
      
      * lisp/net/tramp-smb.el (tramp-smb-handle-file-system-info): New defun.
      (tramp-smb-file-name-handler-alist): Use it.
      (tramp-smb-handle-insert-directory): Insert size information.
      
      * test/lisp/net/tramp-tests.el (tramp-test37-file-system-info):
      New test.
      (tramp-test38-asynchronous-requests)
      (tramp-test39-recursive-load, tramp-test40-remote-load-path)
      (tramp-test41-unload): Rename.
      a9ac20c1
  24. 29 Sep, 2017 1 commit
  25. 25 Sep, 2017 1 commit
  26. 17 Sep, 2017 1 commit
    • Michael Albinus's avatar
      Fix compatibility problem in Tramp · 57249fb2
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-interrupt-process): Better error handling.
      
      * lisp/net/tramp-compat.el (default-toplevel-value): Move up.
      (top): Do not call `tramp-change-syntax' anymore.
      (tramp-compat-directory-name-p): New defalias.
      
      * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
      * lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
      * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
      (tramp-smb-handle-copy-file): Use it.
      
      * test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
      Modify test.
      57249fb2
  27. 13 Sep, 2017 2 commits
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
    • Michael Albinus's avatar
      Improve backward compatibility of tramp-tests · 4ab44f75
      Michael Albinus authored
      * test/lisp/net/tramp-tests.el (seq): Don't require.
      (tramp--test-emacs26-p): New defun.
      (tramp-test10-write-region, tramp-test11-copy-file)
      (tramp-test12-rename-file, tramp-test15-copy-directory)
      (tramp-test21-file-links): Use it.
      (tramp-test16-file-expand-wildcards): Use `copy-sequence'.
      4ab44f75
  28. 12 Sep, 2017 1 commit
    • Michael Albinus's avatar
      Extend tramp-tests according to bug#27986 · 49a42fbd
      Michael Albinus authored
      * test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
      (tramp-test12-rename-file, tramp-test15-copy-directory)
      (tramp-test21-file-links): Extend tests.
      (tramp-test13-make-directory, tramp-test14-delete-directory):
      Specifiy error symbol in `should-error'.
      49a42fbd
  29. 11 Sep, 2017 2 commits
    • Michael Albinus's avatar
      Further optimization in Tramp's file name decomposition · 70045452
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-syntax): Recompute all file name
      components.  Call `custom-set-variables' after loading.
      (tramp-build-prefix-format, tramp-build-prefix-regexp)
      (tramp-build-method-regexp)
      (tramp-build-postfix-method-format)
      (tramp-build-postfix-method-regexp)
      (tramp-build-prefix-ipv6-format)
      (tramp-build-prefix-ipv6-regexp)
      (tramp-build-postfix-ipv6-format)
      (tramp-build-postfix-ipv6-regexp)
      (tramp-build-postfix-host-format)
      (tramp-build-postfix-host-regexp)
      (tramp-build-file-name-regexp)
      (tramp-build-completion-file-name-regexp): New defuns.
      (tramp-prefix-format, tramp-prefix-regexp)
      (tramp-method-regexp, tramp-postfix-method-format)
      (tramp-postfix-method-regexp, tramp-prefix-ipv6-format)
      (tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format)
      (tramp-postfix-ipv6-regexp, tramp-postfix-host-format)
      (tramp-postfix-host-regexp)
      (tramp-remote-file-name-spec-regexp)
      (tramp-file-name-structure, tramp-file-name-regexp)
      (tramp-completion-file-name-regexp): Convert defuns into defvars.
      (tramp-prefix-regexp-alist)
      (tramp-postfix-method-regexp-alist)
      (tramp-prefix-ipv6-regexp-alist)
      (tramp-postfix-ipv6-regexp-alist)
      (tramp-postfix-host-regexp-alist)
      (tramp-remote-file-name-spec-regexp-alist): Remove.
      (tramp-build-remote-file-name-spec-regexp)
      (tramp-build-file-name-structure): Simplify.
      (tramp-completion-file-name-regexp-alist): New defconst.
      (tramp-tramp-file-p, tramp-dissect-file-name)
      (tramp-make-tramp-file-name)
      (tramp-completion-make-tramp-file-name)
      (tramp-rfn-eshadow-update-overlay-regexp)
      (tramp-register-file-name-handlers)
      (tramp-completion-handle-file-name-all-completions)
      (tramp-completion-dissect-file-name, tramp-clear-passwd):
      * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
      * lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered)
      (tramp-compute-multi-hops): Use variables but functions for
      file name components.
      
      * test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
      Use variables but functions for file name components.
      70045452
    • Paul Eggert's avatar
      Port tramp-tests to new copy-directory behavior · 29963648
      Paul Eggert authored
      * test/lisp/net/tramp-tests.el (tramp-test15-copy-directory):
      Use directory name as arg for copy-directory when we want
      the special behavior.
      29963648
  30. 10 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Fix race with rename-file etc. with dir NEWNAME · 01c885f2
      Paul Eggert authored
      This changes the behavior of rename-file etc. slightly.
      The old behavior mostly disagreed with the documentation, and had
      a race condition bug that could allow attackers to modify victims'
      write-protected directories (Bug#27986).
      * doc/lispref/files.texi (Changing Files): Document that in
      rename-file etc., NEWFILE is special if it is a directory name.
      * etc/NEWS: Document the change in behavior.
      * src/fileio.c (directory_like): Remove.  All uses removed.
      (expand_cp_target): Test only whether NEWNAME is a directory name,
      not whether it is currently a directory.  This avoids a race.
      (Fcopy_file, Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
      Document behavior if NEWNAME is a directory name.
      (Frename_file): Simplify now that the destdir behavior occurs
      only when NEWNAME is a directory name.
      * test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
      (tramp-test12-rename-file, tramp--test-check-files):
      Adjust tests to match new behavior.
      01c885f2
  31. 04 Sep, 2017 1 commit
    • Michael Albinus's avatar
      Work on Tramp's (symbolic) links · 8a65d7a7
      Michael Albinus authored
      * doc/misc/tramp.texi (Traces and Profiles): Mention the
      backtrace when tramp-verbose is greater than or equal to 10.
      
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      Use `tramp-handle-add-name-to-file'.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use
      `tramp-handle-add-name-to-file' and `tramp-handle-file-truename'.
      
      * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Improve.
      
      * lisp/net/tramp-smb.el (tramp-smb-errors):
      Add "NT_STATUS_CONNECTION_DISCONNECTED" and
      "NT_STATUS_OBJECT_PATH_SYNTAX_BAD".
      (tramp-smb-file-name-handler-alist): Use `tramp-handle-file-truename'.
      (tramp-smb-do-file-attributes-with-stat): Return non-nil only
      if one of the attributes is non-nil.
      (tramp-smb-handle-file-local-copy): Use `file-truename'.
      (tramp-smb-handle-file-truename): Move to tramp.el.
      (tramp-smb-handle-insert-directory): Show symlinks.
      (tramp-smb-handle-make-symbolic-link): Improve.
      (tramp-smb-read-file-entry): Handle extended file modes in Samba.
      
      * lisp/net/tramp.el (tramp-handle-add-name-to-file)
      (tramp-handle-file-truename): New defuns.
      
      * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
      (tramp--test-check-files): Make check for "smb".
      8a65d7a7
  32. 30 Aug, 2017 1 commit
    • Michael Albinus's avatar
      Improve symlinks for Tramp · 9376ea3f
      Michael Albinus authored
      * lisp/files.el (files--splice-dirname-file): Quote whole file.
      
      * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link):
      Do not expand TARGET, it could be remote.
      (tramp-sh-handle-file-truename): Check for cyclic symlink also
      in case of readlink.  Quote result if it looks remote.
      (tramp-sh-handle-file-local-copy): Use `file-truename'.
      
      * test/lisp/net/tramp-tests.el (tramp-test08-file-local-copy)
      (tramp-test09-insert-file-contents): Test also file missing.
      (tramp-test21-file-links): Extend test.
      9376ea3f