Add unicode related definition for future use. Descibe Samba bug.

Obtained from:	Darwin project
MFC after:	2 weeks
This commit is contained in:
Boris Popov 2002-02-21 16:13:19 +00:00
parent be32ca523d
commit daa35ded10
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=91022
2 changed files with 10 additions and 1 deletions

View File

@ -81,6 +81,7 @@
#define SMBV_SINGLESHARE 0x0080 /* only one share connecting should be allowed */
#define SMBV_CREATE 0x0100 /* lookup for create operation */
/*#define SMBV_FAILED 0x0200*/ /* last reconnect attempt has failed */
#define SMBV_UNICODE 0x0400 /* connection is configured to use Unicode */
/*

View File

@ -264,6 +264,13 @@ smb_smb_ssnsetup(struct smb_vc *vcp, struct smb_cred *scred)
ntencpass = malloc(uniplen, M_SMBTEMP, M_WAITOK);
smb_strtouni(ntencpass, smb_vc_getpass(vcp));
plen--;
/*
* The uniplen is zeroed because Samba cannot deal
* with this 2nd cleartext password. This Samba
* "bug" is actually a workaround for problems in
* Microsoft clients.
*/
uniplen = 0/*-= 2*/;
unipp = ntencpass;
}
@ -298,7 +305,8 @@ smb_smb_ssnsetup(struct smb_vc *vcp, struct smb_cred *scred)
} else {
mb_put_uint16le(mbp, uniplen);
mb_put_uint32le(mbp, 0); /* reserved */
mb_put_uint32le(mbp, 0); /* my caps */
mb_put_uint32le(mbp, vcp->obj.co_flags & SMBV_UNICODE ?
SMB_CAP_UNICODE : 0);
smb_rq_wend(rqp);
smb_rq_bstart(rqp);
mb_put_mem(mbp, pp, plen, MB_MSYSTEM);