]> arthur.barton.de Git - netatalk.git/commit
getvolbypath returns incorrect volume, bug #563
authorRalph Boehme <rb@sernet.de>
Wed, 21 May 2014 14:42:58 +0000 (16:42 +0200)
committerRalph Boehme <rb@sernet.de>
Wed, 21 May 2014 14:48:36 +0000 (16:48 +0200)
commitc74e410eeb03f8fe2fc31a2a4093a1ad5b65c6db
tree21a60fd46bdf1707c60071276687e5ee47de4237
parent4803cb9c31dfd57ecd2326cecb93a5091f5b405e
getvolbypath returns incorrect volume, bug #563

getvolbypath() would match a given path "/foo/barbaz" with an existing
volume path of "/foo/bar" because the strings where compared with
strnlen() where n is the length of "/foo/bar", ie we did a substring
match.

I faintly remember there was a reason for this, but I couldn't come up
with any sensible configuration of usage of dbd that would not also
work by simply using strcmp() instead of strmcmp().

Of course, in order for dbd to work with paths that included a
trailing slash, there's a need to adding some slash stripping code,
because our code (somehow) ensures (hopefully!) that in struct
vol.v_path is always stored with trailinsh slashes stripped.

Signed-off-by: Ralph Boehme <rb@sernet.de>
NEWS
libatalk/util/netatalk_conf.c