More work to adapt to merged libcli/auth function prototypes
authorAndrew Bartlett <abartlet@samba.org>
Tue, 17 Mar 2009 09:08:31 +0000 (20:08 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 14 Apr 2009 06:23:42 +0000 (16:23 +1000)
source3/lib/netapi/joindomain.c
source3/libsmb/cliconnect.c
source3/libsmb/clirap.c
source3/libsmb/ntlmssp.c
source3/libsmb/ntlmssp_sign.c

index 9eedc5de03ef62198391251397ae415f1d7bf578..d4eba5ffee65246d9babb0618394f0759076664d 100644 (file)
@@ -24,6 +24,7 @@
 #include "lib/netapi/netapi_private.h"
 #include "lib/netapi/libnetapi.h"
 #include "libnet/libnet.h"
+#include "libcli/auth/libcli_auth.h"
 
 /****************************************************************
 ****************************************************************/
index 53a812d222f5a14acf3542ee6e3b0512b7a97636..143bdf70197587d2e2653e5f40d1dabdb94e4797 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "../libcli/auth/libcli_auth.h"
 
 static const struct {
        int prot;
@@ -433,11 +434,11 @@ static NTSTATUS cli_session_setup_nt1(struct cli_state *cli, const char *user,
                           the server's domain at this point.  The 'server name' is also
                           dodgy... 
                        */
-                       names_blob = NTLMv2_generate_names_blob(cli->called.name, workgroup);
+                       names_blob = NTLMv2_generate_names_blob(NULL, cli->called.name, workgroup);
 
-                       if (!SMBNTLMv2encrypt(user, workgroup, pass, &server_chal, 
+                       if (!SMBNTLMv2encrypt(NULL, user, workgroup, pass, &server_chal, 
                                              &names_blob,
-                                             &lm_response, &nt_response, &session_key)) {
+                                             &lm_response, &nt_response, NULL, &session_key)) {
                                data_blob_free(&names_blob);
                                data_blob_free(&server_chal);
                                return NT_STATUS_ACCESS_DENIED;
@@ -474,7 +475,7 @@ static NTSTATUS cli_session_setup_nt1(struct cli_state *cli, const char *user,
                        E_deshash(pass, session_key.data);
                        memset(&session_key.data[8], '\0', 8);
 #else
-                       SMBsesskeygen_ntv1(nt_hash, NULL, session_key.data);
+                       SMBsesskeygen_ntv1(nt_hash, session_key.data);
 #endif
                }
                cli_temp_set_signing(cli);
index cc8c9ba67f4b1eab6ee9636c713f78687985c10f..976e184e9c88bc528755283a501d2fee2c7e97a3 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "../libcli/auth/libcli_auth.h"
 
 /****************************************************************************
  Call a remote api
index f9976902d87204808ceeb27f867c823029171bea..80c003283e112f50f14015d3722d6cbf2d2521dc 100644 (file)
@@ -323,7 +323,7 @@ NTSTATUS ntlmssp_update(NTLMSSP_STATE *ntlmssp_state,
                        break;
                }
        } else {
-               if (!msrpc_parse(&input, "Cd",
+               if (!msrpc_parse(NULL, &input, "Cd",
                                 "NTLMSSP",
                                 &ntlmssp_command)) {
                        DEBUG(1, ("Failed to parse NTLMSSP packet, could not extract NTLMSSP command\n"));
@@ -525,7 +525,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
 #endif
 
        if (request.length) {
-               if ((request.length < 16) || !msrpc_parse(&request, "Cdd",
+               if ((request.length < 16) || !msrpc_parse(NULL, &request, "Cdd",
                                                        "NTLMSSP",
                                                        &ntlmssp_command,
                                                        &neg_flags)) {
@@ -582,7 +582,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
        /* This creates the 'blob' of names that appears at the end of the packet */
        if (chal_flags & NTLMSSP_CHAL_TARGET_INFO)
        {
-               msrpc_gen(&struct_blob, "aaaaa",
+               msrpc_gen(NULL, &struct_blob, "aaaaa",
                          NTLMSSP_NAME_TYPE_DOMAIN, target_name,
                          NTLMSSP_NAME_TYPE_SERVER, ntlmssp_state->get_global_myname(),
                          NTLMSSP_NAME_TYPE_DOMAIN_DNS, dnsdomname,
@@ -601,7 +601,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
                        gen_string = "CdAdbddB";
                }
 
-               msrpc_gen(reply, gen_string,
+               msrpc_gen(NULL, reply, gen_string,
                          "NTLMSSP",
                          NTLMSSP_CHALLENGE,
                          target_name,
@@ -669,7 +669,7 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
        ntlmssp_state->workstation = NULL;
 
        /* now the NTLMSSP encoded auth hashes */
-       if (!msrpc_parse(&request, parse_string,
+       if (!msrpc_parse(NULL, &request, parse_string,
                         "NTLMSSP", 
                         &ntlmssp_command, 
                         &ntlmssp_state->lm_resp,
@@ -693,7 +693,7 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
                }
 
                /* now the NTLMSSP encoded auth hashes */
-               if (!msrpc_parse(&request, parse_string,
+               if (!msrpc_parse(NULL, &request, parse_string,
                                 "NTLMSSP", 
                                 &ntlmssp_command, 
                                 &ntlmssp_state->lm_resp,
@@ -971,7 +971,7 @@ static NTSTATUS ntlmssp_client_initial(struct ntlmssp_state *ntlmssp_state,
        }
 
        /* generate the ntlmssp negotiate packet */
-       msrpc_gen(next_request, "CddAA",
+       msrpc_gen(NULL, next_request, "CddAA",
                  "NTLMSSP",
                  NTLMSSP_NEGOTIATE,
                  ntlmssp_state->neg_flags,
@@ -1008,7 +1008,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
        DATA_BLOB encrypted_session_key = data_blob_null;
        NTSTATUS nt_status = NT_STATUS_OK;
 
-       if (!msrpc_parse(&reply, "CdBd",
+       if (!msrpc_parse(NULL, &reply, "CdBd",
                         "NTLMSSP",
                         &ntlmssp_command, 
                         &server_domain_blob,
@@ -1046,7 +1046,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
        DEBUG(3, ("NTLMSSP: Set final flags:\n"));
        debug_ntlmssp_flags(ntlmssp_state->neg_flags);
 
-       if (!msrpc_parse(&reply, chal_parse_string,
+       if (!msrpc_parse(NULL, &reply, chal_parse_string,
                         "NTLMSSP",
                         &ntlmssp_command, 
                         &server_domain,
@@ -1179,7 +1179,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
        }
 
        /* this generates the actual auth packet */
-       if (!msrpc_gen(next_request, auth_gen_string, 
+       if (!msrpc_gen(NULL, next_request, auth_gen_string, 
                       "NTLMSSP", 
                       NTLMSSP_AUTH, 
                       lm_response.data, lm_response.length,
index d3d358d33267f05b12430cd7deeb1a67dbb38a93..dc1b47a94f91edebccc0a460acdb3eb7b2b3c50f 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include "includes.h"
+#include "../libcli/auth/libcli_auth.h"
 
 #define CLI_SIGN "session key to client-to-server signing key magic constant"
 #define CLI_SEAL "session key to client-to-server sealing key magic constant"
@@ -124,7 +125,7 @@ static NTSTATUS ntlmssp_make_packet_signature(NTLMSSP_STATE *ntlmssp_state,
        } else {
                uint32 crc;
                crc = crc32_calc_buffer(data, length);
-               if (!msrpc_gen(sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmv1_seq_num)) {
+               if (!msrpc_gen(NULL, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmv1_seq_num)) {
                        return NT_STATUS_NO_MEMORY;
                }
                
@@ -271,7 +272,7 @@ NTSTATUS ntlmssp_seal_packet(NTLMSSP_STATE *ntlmssp_state,
        } else {
                uint32 crc;
                crc = crc32_calc_buffer(data, length);
-               if (!msrpc_gen(sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmv1_seq_num)) {
+               if (!msrpc_gen(NULL, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmv1_seq_num)) {
                        return NT_STATUS_NO_MEMORY;
                }