diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-05 18:22:57 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-07 08:33:41 +0200 |
commit | 013d2abc75b7d17e8ea22ae1d90c0308f3332ad0 (patch) | |
tree | 8e5d8ccef6e3da43d838090a03488ca5100bb867 /source3 | |
parent | 96a3ec51b40ff6d84d7194dcd5386884f00122bd (diff) | |
download | samba-013d2abc75b7d17e8ea22ae1d90c0308f3332ad0.tar.gz samba-013d2abc75b7d17e8ea22ae1d90c0308f3332ad0.tar.bz2 samba-013d2abc75b7d17e8ea22ae1d90c0308f3332ad0.zip |
s3:smb2cli: don't terminate the pathname in smb2cli_query_directory()
Windows generates NT_STATUS_OBJECT_NAME_INVALID otherwise.
metze
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/smb2cli_query_directory.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/libsmb/smb2cli_query_directory.c b/source3/libsmb/smb2cli_query_directory.c index 2286f2ce6f..4a0e69b534 100644 --- a/source3/libsmb/smb2cli_query_directory.c +++ b/source3/libsmb/smb2cli_query_directory.c @@ -59,12 +59,17 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx, } if (!convert_string_talloc(state, CH_UNIX, CH_UTF16, - mask, strlen(mask)+1, + mask, strlen(mask), &dyn, &dyn_len)) { tevent_req_oom(req); return tevent_req_post(req, ev); } + if (strlen(mask) == 0) { + TALLOC_FREE(dyn); + dyn_len = 0; + } + fixed = state->fixed; SSVAL(fixed, 0, 33); SCVAL(fixed, 2, level); |