]> git.ipfire.org Git - thirdparty/samba.git/commit
smbd: Fix previous_slash()
authorVolker Lendecke <vl@samba.org>
Tue, 24 Oct 2023 11:18:32 +0000 (13:18 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 1 Nov 2023 18:55:32 +0000 (18:55 +0000)
commitea1687054570d653b2f19197436ff00dc08089c2
tree03978981360ae533e7be5f669991b2bc32f7647b
parent170b67b3b06f0582de2d2463983ad5d1e08cbe37
smbd: Fix previous_slash()

Untested code is broken code... previous_slash() did not return a
pointer to the slash but after it. This went undetected because so far
we never call symlink_target_path() with "unparsed==0". Once we
started doing that, we would find that the "unparsed==0" case actually
puts parent on the "previous slash", not the character behind it.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/filename.c