diff options
Diffstat (limited to 'tests/018')
-rw-r--r-- | tests/018/path-safe.tl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/018/path-safe.tl b/tests/018/path-safe.tl index 767ee752..2c86ca3e 100644 --- a/tests/018/path-safe.tl +++ b/tests/018/path-safe.tl @@ -86,4 +86,29 @@ (test (path-components-safe "a") nil) +(mtest + (path-components-safe "/proc/1") t + (path-components-safe "/proc/1/cwd") :error + (path-components-safe "/proc/self/cwd") t) + (seteuid 0) + +(mtest + (path-components-safe "/proc/1") t + (path-components-safe "/proc/1/fd") t + (path-components-safe "/proc/sys/../1") t + (path-components-safe "/proc/1/cwd") nil + (path-components-safe "/proc/1/cwd/foo") nil + (path-components-safe "/proc/self/cwd") nil + (path-components-safe "/proc/self/cwd/foo") nil + (path-components-safe "/proc/1/root") nil + (path-components-safe "/proc/1/root/foo") nil + (path-components-safe "/proc/1/fd/0") nil + (path-components-safe "/proc/1/fd/0/bar") nil + (path-components-safe "/proc/1/map_files") nil + (path-components-safe "/proc/1/map_files/bar") nil + (path-components-safe "/proc/sys/../1/cwd") nil + (path-components-safe "/proc/1/task/1") t + (path-components-safe "/proc/1/task/1/fd/0") nil + (path-components-safe "/proc/1/task/1/cwd") nil + (path-components-safe "/proc/1/task/1/root") nil) |