r884: convert samba4 to use [u]int32_t instead of [u]int32
[bbaumbach/samba-autobuild/.git] / source4 / torture / rpc / netlogon.c
index 25c0496a00dc41a0a3d670a4d0c306b4a6f197f2..e3ff679d97984d0aae5e63e5ffb9871b8eabf079 100644 (file)
@@ -48,8 +48,8 @@ static BOOL join_domain_bdc(TALLOC_CTX *mem_ctx)
        union samr_UserInfo u;
        struct policy_handle handle;
        struct policy_handle domain_handle;
-       uint32 access_granted;
-       uint32 rid;
+       uint32_t access_granted;
+       uint32_t rid;
        BOOL ret = True;
        DATA_BLOB session_key;
        struct samr_Name name;
@@ -288,7 +288,7 @@ static BOOL test_SetupCredentials(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 }
 
 static BOOL test_SetupCredentials2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
-                                  uint32 negotiate_flags,
+                                  uint32_t negotiate_flags,
                                   struct creds_CredentialState *creds)
 {
        NTSTATUS status;
@@ -741,14 +741,15 @@ static BOOL test_lmv2_ntlmv2_broken(struct samlogon_state *samlogon_state, enum
        DATA_BLOB ntlmv2_response = data_blob(NULL, 0);
        DATA_BLOB lmv2_response = data_blob(NULL, 0);
        DATA_BLOB ntlmv2_session_key = data_blob(NULL, 0);
-       DATA_BLOB names_blob = NTLMv2_generate_names_blob(lp_netbios_name(), lp_workgroup());
+       DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, lp_netbios_name(), lp_workgroup());
 
        uchar user_session_key[16];
 
        ZERO_STRUCT(user_session_key);
        
        /* TODO - test with various domain cases, and without domain */
-       if (!SMBNTLMv2encrypt(samlogon_state->username, lp_workgroup(), samlogon_state->password, &samlogon_state->chall,
+       if (!SMBNTLMv2encrypt(samlogon_state->username, lp_workgroup(), 
+                             samlogon_state->password, &samlogon_state->chall,
                              &names_blob,
                              &lmv2_response, &ntlmv2_response, 
                              &ntlmv2_session_key)) {
@@ -1091,7 +1092,7 @@ static BOOL test_DatabaseSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
        NTSTATUS status;
        struct netr_DatabaseSync r;
        struct creds_CredentialState creds;
-       const uint32 database_ids[] = {0, 1, 2}; 
+       const uint32_t database_ids[] = {0, 1, 2}; 
        int i;
        BOOL ret = True;
 
@@ -1101,7 +1102,7 @@ static BOOL test_DatabaseSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 
        r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
        r.in.computername = TEST_MACHINE_NAME;
-       r.in.preferredmaximumlength = (uint32)-1;
+       r.in.preferredmaximumlength = (uint32_t)-1;
        ZERO_STRUCT(r.in.return_authenticator);
 
        for (i=0;i<ARRAY_SIZE(database_ids);i++) {
@@ -1152,7 +1153,7 @@ static BOOL test_DatabaseDeltas(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
        NTSTATUS status;
        struct netr_DatabaseDeltas r;
        struct creds_CredentialState creds;
-       const uint32 database_ids[] = {0, 1, 2}; 
+       const uint32_t database_ids[] = {0, 1, 2}; 
        int i;
        BOOL ret = True;
 
@@ -1162,7 +1163,7 @@ static BOOL test_DatabaseDeltas(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 
        r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
        r.in.computername = TEST_MACHINE_NAME;
-       r.in.preferredmaximumlength = (uint32)-1;
+       r.in.preferredmaximumlength = (uint32_t)-1;
        ZERO_STRUCT(r.in.return_authenticator);
 
        for (i=0;i<ARRAY_SIZE(database_ids);i++) {
@@ -1437,7 +1438,7 @@ static BOOL test_DatabaseSync2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
        NTSTATUS status;
        struct netr_DatabaseSync2 r;
        struct creds_CredentialState creds;
-       const uint32 database_ids[] = {0, 1, 2}; 
+       const uint32_t database_ids[] = {0, 1, 2}; 
        int i;
        BOOL ret = True;
 
@@ -1447,7 +1448,7 @@ static BOOL test_DatabaseSync2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 
        r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
        r.in.computername = TEST_MACHINE_NAME;
-       r.in.preferredmaximumlength = (uint32)-1;
+       r.in.preferredmaximumlength = (uint32_t)-1;
        ZERO_STRUCT(r.in.return_authenticator);
 
        for (i=0;i<ARRAY_SIZE(database_ids);i++) {