diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2013-12-08 08:34:31 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2013-12-08 08:34:31 +0100 |
commit | 007520e3fef2c12a2ee7844d1ac016668a804132 (patch) | |
tree | b3961b83c7271d5cb971cd90e49d6bbf91c95842 /sys/src/cmd/cifs | |
parent | c940e986302d16d6e09d61c908d45730b3873766 (diff) |
handle NIL user domain, and Z(4) at end of nt blob for ntlmv2
the nt blob ends with 4 zero bytes, this is not the same as
the EOL av-pair terminator!
this makes ntlmv2 work with windows xp with LmCompatibityLevel = 3
Diffstat (limited to 'sys/src/cmd/cifs')
-rw-r--r-- | sys/src/cmd/cifs/auth.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/src/cmd/cifs/auth.c b/sys/src/cmd/cifs/auth.c index 5bf2433f9..c491b335a 100644 --- a/sys/src/cmd/cifs/auth.c +++ b/sys/src/cmd/cifs/auth.c @@ -206,8 +206,15 @@ ntv2_blob(uchar *blob, int len, char *windom) *p++ = 0; *p++ = 0; + len -= 4; p += putname(p, len - (p-blob), windom, Bdomain); p += putname(p, len - (p-blob), "", Beof); + len += 4; + + *p++ = 0; /* 32bit: unknown data */ + *p++ = 0; + *p++ = 0; + *p++ = 0; return p - blob; } |