s3: lib: Fix two old, old bugs in set_conn_connectpath(), now in canonicalize_absolut...
authorJeremy Allison <jra@samba.org>
Thu, 19 Jan 2017 23:18:41 +0000 (15:18 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 30 Jan 2017 17:39:18 +0000 (18:39 +0100)
commit82979afc46cc5e466bdd999a94080e7a5df95518
tree240e88e799d3ced0847916288088bc8ae2871998
parent02599c39337c3049762a6b0bd6290577817ee5a5
s3: lib: Fix two old, old bugs in set_conn_connectpath(), now in canonicalize_absolute_path().

Canonicalizing a path of /foo/bar/../baz would return /foo/barbaz
as moving forward 3 characters would delete the / character.

Canonicalizing /foo/.. would end up as '\0'.

Test to follow.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12531

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/lib/util_path.c