1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

smbd/trans2: add a useful diagnostic for files with bad encoding

Catch conversion error and log the path of the offending file.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jun  9 21:00:02 CEST 2015 on sn-devel-104
This commit is contained in:
Ralph Boehme 2015-06-03 17:07:46 +02:00 committed by Jeremy Allison
parent 1c60dc5c32
commit 0615b72a6b

View File

@ -2374,6 +2374,10 @@ NTSTATUS smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
ppdata,
end_data,
&last_entry_off);
if (NT_STATUS_EQUAL(status, NT_STATUS_ILLEGAL_CHARACTER)) {
DEBUG(1,("Conversion error: illegal character: %s\n",
smb_fname_str_dbg(smb_fname)));
}
TALLOC_FREE(fname);
TALLOC_FREE(smb_fname);
if (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) {