1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

libsmb: Pass the correct path to cli_posix_stat()

This fixes doing strlen() on talloc_tos(), about which valgrind is pretty
unhappy. Without this patch we survive the tests because we have fallbacks to
the non-posix flavors of stat(). With this patch in place cli_posix_stat()
becomes functional in this code path. This creates conflicts with the readdir
libsmbclient tests, which need fixing separately.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2020-02-24 09:42:46 -08:00 committed by Jeremy Allison
parent 5076e28aec
commit 51551e0d53
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1,2 @@
samba4.libsmbclient.readdirplus2.NT1.readdirplus2.*
samba4.libsmbclient.readdirplus_seek.NT1.readdirplus_seek.*

View File

@ -503,7 +503,7 @@ SMBC_getatr(SMBCCTX * context,
if (srv->try_posixinfo) {
SMB_STRUCT_STAT sbuf;
status = cli_posix_stat(targetcli, frame, &sbuf);
status = cli_posix_stat(targetcli, targetpath, &sbuf);
if (NT_STATUS_IS_OK(status)) {
setup_stat_from_stat_ex(&sbuf, path, sb);