trying to get HEAD building again. If you want the code
[sfrench/samba-autobuild/.git] / source3 / smbd / negprot.c
index db0694a840447758bea3170fae7c365c7a07e38c..f452dd845b634476a04ec02837b15710914f4b39 100644 (file)
@@ -101,6 +101,7 @@ static int reply_lanman1(char *inbuf, char *outbuf)
        /* Create a token value and add it to the outgoing packet. */
        if (global_encrypted_passwords_negotiated) {
                get_challenge(smb_buf(outbuf));
+               SSVAL(outbuf,smb_vwv11, 8);
        }
 
        Protocol = PROTOCOL_LANMAN1;
@@ -144,6 +145,7 @@ static int reply_lanman2(char *inbuf, char *outbuf)
        /* Create a token value and add it to the outgoing packet. */
        if (global_encrypted_passwords_negotiated) {
                get_challenge(smb_buf(outbuf));
+               SSVAL(outbuf,smb_vwv11, 8);
        }
 
        Protocol = PROTOCOL_LANMAN2;
@@ -180,7 +182,17 @@ static int negprot_spnego(char *p)
 
        ZERO_STRUCT(guid);
        safe_strcpy((char *)guid, global_myname(), sizeof(guid)-1);
-       strlower((char *)guid);
+
+#ifdef DEVELOPER
+       /* valgrind fixer... */
+       {
+               size_t sl = strlen(guid);
+               if (sizeof(guid)-sl)
+                       memset(&guid[sl], '\0', sizeof(guid)-sl);
+       }
+#endif
+
+       strlower_m((char *)guid);
 
 #if 0
        /* strangely enough, NT does not sent the single OID NTLMSSP when