diff options
Diffstat (limited to 'sys/netsmb/smb_smb.c')
-rw-r--r-- | sys/netsmb/smb_smb.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/netsmb/smb_smb.c b/sys/netsmb/smb_smb.c index 16e99ed..6d07d34 100644 --- a/sys/netsmb/smb_smb.c +++ b/sys/netsmb/smb_smb.c @@ -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); |