Make sure that an NTLMSSP negotiate blob has the correct stuff in it!
[kai/samba.git] / source / libsmb / cliconnect.c
index c441cf28a8cc897725fce7a63bc6b9d2dde6dcd8..7ef9b2ab824680f5ab6806505d86fc138d0e4f8c 100644 (file)
@@ -486,11 +486,12 @@ static BOOL cli_session_setup_ntlmssp(struct cli_state *cli, char *user,
        memset(sess_key, 0, 16);
 
        /* generate the ntlmssp negotiate packet */
-       msrpc_gen(&blob, "CddB",
+       msrpc_gen(&blob, "CddAA",
                  "NTLMSSP",
                  NTLMSSP_NEGOTIATE,
                  neg_flags,
-                 sess_key, 16);
+                 workgroup, strlen(workgroup),
+                 cli->calling.name, strlen(cli->calling.name));
 
        /* and wrap it in a SPNEGO wrapper */
        msg1 = gen_negTokenTarg(mechs, blob);