Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
49cd561d
Commit
49cd561d
authored
Sep 25, 2017
by
Michael Albinus
Browse files
* test/lisp/tramp-tests.el (tramp-test21-file-links): Special code for smb.
parent
b719f6b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
lisp/net/tramp-smb.el
lisp/net/tramp-smb.el
+5
-1
test/lisp/net/tramp-tests.el
test/lisp/net/tramp-tests.el
+9
-6
No files found.
lisp/net/tramp-smb.el
View file @
49cd561d
...
...
@@ -535,7 +535,7 @@ pass to the OPERATION."
;; Reset the transfer process properties.
(
tramp-set-connection-property
v
"process-name"
nil
)
(
tramp-set-connection-property
v
"process-buffer"
nil
)
(
when
t1
(
delete-directory
tmpdir
'recurse
))))
(
when
t1
(
delete-directory
tmpdir
'recurs
iv
e
))))
;; Handle KEEP-DATE argument.
(
when
keep-date
...
...
@@ -1583,6 +1583,10 @@ If VEC has no cifs capabilities, exchange \"/\" by \"\\\\\"."
"Read entries which match DIRECTORY.
Either the shares are listed, or the `dir' command is executed.
Result is a list of (LOCALNAME MODE SIZE MONTH DAY TIME YEAR)."
;; If CIFS capabilities are enabled, symlinks are not listed
;; by `dir'. This is a consequence of
;; <https://www.samba.org/samba/news/symlink_attack.html>. See also
;; <https://bugzilla.samba.org/show_bug.cgi?id=5116>.
(
with-parsed-tramp-file-name
(
file-name-as-directory
directory
)
nil
(
setq
localname
(
or
localname
"/"
))
(
with-tramp-file-property
v
localname
"file-entries"
...
...
test/lisp/net/tramp-tests.el
View file @
49cd561d
...
...
@@ -2653,8 +2653,9 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(
tmp-name1
(
tramp--test-make-temp-name
nil
quoted
))
(
tmp-name2
(
tramp--test-make-temp-name
nil
quoted
))
(
tmp-name3
(
tramp--test-make-temp-name
'local
quoted
))
(
tmp-name4
(
tramp--test-make-temp-name
nil
quoted
)))
(
tmp-name4
(
tramp--test-make-temp-name
nil
quoted
))
(
tmp-name5
(
expand-file-name
(
file-name-nondirectory
tmp-name1
)
tmp-name4
)))
;; Check `make-symbolic-link'.
(
unwind-protect
(
tramp--test-ignore-make-symbolic-link-error
...
...
@@ -2716,9 +2717,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(
funcall
(
if
quoted
'tramp-compat-file-name-unquote
'identity
)
(
file-remote-p
tmp-name1
'localname
))
(
file-symlink-p
(
expand-file-name
(
file-name-nondirectory
tmp-name1
)
tmp-name4
)))))
(
file-symlink-p
tmp-name5
)))
;; `smbclient' does not show symlinks in directories, so
;; we cannot delete a non-empty directory. We delete the
;; file explicitely.
(
delete-file
tmp-name5
))
;; Cleanup.
(
ignore-errors
...
...
@@ -2737,7 +2740,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(
should-error
(
add-name-to-file
tmp-name1
tmp-name2
)
:type
'file-already-exists
)
;; number means interactive case.
;;
A
number means interactive case.
(
cl-letf
(((
symbol-function
'yes-or-no-p
)
'ignore
))
(
should-error
(
add-name-to-file
tmp-name1
tmp-name2
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment