mirror of
https://github.com/zsh-users/zsh
synced 2024-07-21 10:14:19 +00:00
45583/0008: Extend tests to prove that what remains of xsymlinks() handles symlink loops gracefully.
This commit is contained in:
parent
dabfd1f1fb
commit
fc286a7c11
|
@ -1,5 +1,9 @@
|
|||
2020-03-25 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* 45583/0008: Etc/BUGS, Src/utils.c, Test/B13whence.ztst:
|
||||
Extend tests to prove that what remains of xsymlinks() handles
|
||||
symlink loops gracefully.
|
||||
|
||||
* 45583/0007: Src/utils.c: Remove code that is now unreachable.
|
||||
|
||||
* 45583/0006: Src/utils.c: Don't use xsymlinks() in 'whence -s'.
|
||||
|
|
3
Etc/BUGS
3
Etc/BUGS
|
@ -29,6 +29,3 @@ skipped when STTY=... is set for that command
|
|||
44007 - Martijn - exit in trap executes rest of function
|
||||
See test case in Test/C03traps.ztst.
|
||||
------------------------------------------------------------------------
|
||||
45282: xsymlinks() segfaults on symlink loops
|
||||
Fixed for some cases; need to audit remaining callers
|
||||
------------------------------------------------------------------------
|
||||
|
|
|
@ -922,8 +922,6 @@ slashsplit(char *s)
|
|||
/* expands .. or . expressions and one level of symlinks
|
||||
*
|
||||
* Puts the result in the global "xbuf"
|
||||
*
|
||||
* WARNING: This will segfault on symlink loops (thread: workers/45282)
|
||||
*/
|
||||
|
||||
/**/
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
ln -s real step3
|
||||
ln -s step3 step2
|
||||
ln -s step2 step1
|
||||
ln -s loop loop
|
||||
ln -s flip flop
|
||||
ln -s flop flip
|
||||
touch real
|
||||
chmod +x real
|
||||
prefix=$PWD
|
||||
|
@ -20,3 +23,9 @@
|
|||
0q:whence symlink resolution
|
||||
>$prefix/step1 -> $prefix/step2 -> $prefix/step3 -> $prefix/real
|
||||
>$prefix/step1 -> $prefix/real
|
||||
|
||||
(
|
||||
path=( $PWD/whence.tmp $path )
|
||||
whence -S flip || whence -S loop || whence -s flip || whence -s loop
|
||||
)
|
||||
1:whence deals with symlink loops gracefully
|
||||
|
|
Loading…
Reference in a new issue