canonicalize_absolute_path() has a bug.
In canonicalize_absolute_path()
///a/./././///component/../////path/ -> /a//path
It should go to /a/path. Mark as knownfail.
Adding these tests so I can ultimately remove
resolve_realpath_name() and re-use the existing
canonicalize_absolute_path() code in vfs_widelinks.c
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
--- /dev/null
+samba3.smbtorture_s3.LOCAL-CANONICALIZE-PATH
+
".././././",
".././././../../../boo",
"./..",
+ "/",
+ "/../../",
+ "/foo/../",
+ "/./././",
+ "/./././.",
+ "/.../././.",
+ "/./././.foo",
+ "/./././.foo.",
+ "/./././foo.",
+ "/foo/bar/..",
+ "/foo/bar/../baz/",
+ "////////////////",
+ "/////////./././././.",
+ "/./.././../.boo/../baz",
+ "/a/component/path",
+ "/a/component/path/",
+ "/a/component/path/..",
+ "/a/component/../path/",
+ "///a/./././///component/../////path/",
NULL
};
const char *dst[] = {
"/",
"/boo",
"/",
+ "/",
+ "/",
+ "/",
+ "/",
+ "/",
+ "/...",
+ "/.foo",
+ "/.foo.",
+ "/foo.",
+ "/foo",
+ "/foo/baz",
+ "/",
+ "/",
+ "/baz",
+ "/a/component/path",
+ "/a/component/path",
+ "/a/component",
+ "/a/path",
+ "/a/path",
NULL
};
unsigned int i;