From 10fe0ae721194157d87f306feab30b5f3f42c9b9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 25 Mar 2005 19:52:01 +0000 Subject: r6063: Fix for bug #2533 - ensure SMBsearch unsets UNICODE flags2 bit as this SMB is DOS codepage only. Jeremy. (This used to be commit 56cc756b9d14db23b2640c347f729fa90dad9b6a) --- source3/smbd/reply.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/smbd/reply.c') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 17423c531d..6cc6a97afc 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1090,7 +1090,10 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size if (Protocol >= PROTOCOL_NT1) SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) | FLAGS2_IS_LONG_NAME); - + + /* This SMB *always* returns ASCII names. Remove the unicode bit in flags2. */ + SSVAL(outbuf,smb_flg2, (SVAL(outbuf, smb_flg2) & (~FLAGS2_UNICODE_STRINGS))); + outsize += DIR_STRUCT_SIZE*numentries; smb_setlen(outbuf,outsize - 4); -- cgit