]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r6063: Fix for bug #2533 - ensure SMBsearch unsets UNICODE flags2 bit as this SMB is
authorJeremy Allison <jra@samba.org>
Fri, 25 Mar 2005 19:52:01 +0000 (19:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:20 +0000 (10:56 -0500)
DOS codepage only.
Jeremy.

source/smbd/reply.c

index 17423c531dc2cbcff65c84430120bf288473b0dc..6cc6a97afca0e00c89df9a367b1ca6254e08debd 100644 (file)
@@ -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);