mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3: lib: Fix canonicalize_absolute_path() to pass the tests from resolve_realpath_name()
Remove the knownfail. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
9cea0cc5b5
commit
d01e11cf26
@ -1,2 +0,0 @@
|
||||
samba3.smbtorture_s3.LOCAL-CANONICALIZE-PATH
|
||||
|
@ -130,7 +130,13 @@ char *canonicalize_absolute_path(TALLOC_CTX *ctx, const char *abs_path)
|
||||
s++;
|
||||
}
|
||||
if ((d > destname + 1) && (*s != '\0')) {
|
||||
*d++ = '/';
|
||||
if (!start_of_name_component) {
|
||||
/*
|
||||
* Only write a / if we
|
||||
* haven't just written one.
|
||||
*/
|
||||
*d++ = '/';
|
||||
}
|
||||
}
|
||||
start_of_name_component = true;
|
||||
continue;
|
||||
@ -178,6 +184,12 @@ char *canonicalize_absolute_path(TALLOC_CTX *ctx, const char *abs_path)
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Step forward one to leave the
|
||||
* last written '/' alone.
|
||||
*/
|
||||
d++;
|
||||
|
||||
/*
|
||||
* We're still at the start of a name
|
||||
* component, just the previous one.
|
||||
|
Loading…
Reference in New Issue
Block a user