Changeset 919 for vendor/current/source4
- Timestamp:
- Jun 9, 2016, 2:17:22 PM (9 years ago)
- Location:
- vendor/current/source4
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source4/heimdal/cf/make-proto.pl
r917 r919 2 2 # $Id$ 3 3 4 ##use Getopt::Std;5 require 'getopts.pl';4 use Getopt::Std; 5 #require 'getopts.pl'; 6 6 7 7 my $comment = 0; … … 13 13 my $private_func_re = "^_"; 14 14 15 Getopts('x:m:o:p:dqE:R:P:') || die "foo";15 getopts('x:m:o:p:dqE:R:P:') || die "foo"; 16 16 17 17 if($opt_d) { -
vendor/current/source4/lib/ldb/wscript
r917 r919 136 136 vnum=VERSION, 137 137 private_library=private_library, 138 manpages='man/ldb.3', 139 abi_directory = 'ABI', 140 abi_match = abi_match) 138 manpages='man/ldb.3') 141 139 142 140 # generate a include/ldb_version.h -
vendor/current/source4/librpc/rpc/dcerpc.c
r860 r919 700 700 default: 701 701 return NT_STATUS_INVALID_LEVEL; 702 } 703 704 if (pkt->auth_length == 0) { 705 return NT_STATUS_INVALID_NETWORK_RESPONSE; 706 } 707 708 if (c->security_state.generic_state == NULL) { 709 return NT_STATUS_INTERNAL_ERROR; 702 710 } 703 711 … … 1075 1083 1076 1084 /* the bind_ack might contain a reply set of credentials */ 1077 if (conn->security_state.auth_info && pkt-> u.bind_ack.auth_info.length) {1085 if (conn->security_state.auth_info && pkt->auth_length) { 1078 1086 NTSTATUS status; 1079 1087 uint32_t auth_length; … … 1848 1856 1849 1857 /* the alter_resp might contain a reply set of credentials */ 1850 if (recv_pipe->conn->security_state.auth_info && 1851 pkt->u.alter_resp.auth_info.length) { 1858 if (recv_pipe->conn->security_state.auth_info && pkt->auth_length) { 1852 1859 struct dcecli_connection *conn = recv_pipe->conn; 1853 1860 NTSTATUS status; -
vendor/current/source4/librpc/rpc/dcerpc_util.c
r917 r919 594 594 /* Perform an authenticated DCE-RPC bind 595 595 */ 596 if (!(conn->flags & (DCERPC_ SIGN|DCERPC_SEAL))) {596 if (!(conn->flags & (DCERPC_CONNECT|DCERPC_SEAL))) { 597 597 /* 598 598 we are doing an authenticated connection, 599 but not using sign or seal. We must force600 the CONNECT dcerpc auth type as a NONE auth601 type doesn't allow authentication602 information to be passed.599 which needs to use [connect], [sign] or [seal]. 600 If nothing is specified, we default to [sign] now. 601 This give roughly the same protection as 602 ncacn_np with smb signing. 603 603 */ 604 conn->flags |= DCERPC_ CONNECT;604 conn->flags |= DCERPC_SIGN; 605 605 } 606 606 -
vendor/current/source4/rpc_server/dcesrv_auth.c
r740 r919 47 47 uint32_t auth_length; 48 48 49 if (pkt-> u.bind.auth_info.length == 0) {49 if (pkt->auth_length == 0) { 50 50 dce_conn->auth_state.auth_info = NULL; 51 51 return true; … … 109 109 NTSTATUS status; 110 110 111 if ( !call->conn->auth_state.gensec_security) {111 if (call->pkt.auth_length == 0) { 112 112 return NT_STATUS_OK; 113 113 } … … 156 156 uint32_t auth_length; 157 157 158 /* We can't work without an existing gensec state, and an new blob to feed it */ 159 if (!dce_conn->auth_state.auth_info || 160 !dce_conn->auth_state.gensec_security || 161 pkt->u.auth3.auth_info.length == 0) { 158 if (pkt->auth_length == 0) { 159 return false; 160 } 161 162 if (!dce_conn->auth_state.auth_info) { 163 return false; 164 } 165 166 /* We can't work without an existing gensec state */ 167 if (!dce_conn->auth_state.gensec_security) { 162 168 return false; 163 169 } … … 204 210 205 211 /* on a pure interface change there is no auth blob */ 206 if (pkt-> u.alter.auth_info.length == 0) {212 if (pkt->auth_length == 0) { 207 213 return true; 208 214 } … … 239 245 /* on a pure interface change there is no auth_info structure 240 246 setup */ 241 if (!call->conn->auth_state.auth_info || 242 dce_conn->auth_state.auth_info->credentials.length == 0) { 247 if (call->pkt.auth_length == 0) { 243 248 return NT_STATUS_OK; 244 249 } … … 313 318 314 319 default: 320 return false; 321 } 322 323 if (pkt->auth_length == 0) { 324 DEBUG(1,("dcesrv_auth_request: unexpected auth_length of 0\n")); 315 325 return false; 316 326 } -
vendor/current/source4/torture/basic/base.c
r917 r919 1477 1477 { 1478 1478 bool nt_status_support; 1479 bool client_ntlmv2_auth; 1479 1480 struct smbcli_state *cli_nt = NULL, *cli_dos = NULL; 1480 1481 bool result = false; … … 1486 1487 1487 1488 nt_status_support = lpcfg_nt_status_support(tctx->lp_ctx); 1489 client_ntlmv2_auth = lpcfg_client_ntlmv2_auth(tctx->lp_ctx); 1488 1490 1489 1491 if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support", "yes")) { … … 1491 1493 goto fail; 1492 1494 } 1495 if (!lpcfg_set_cmdline(tctx->lp_ctx, "client ntlmv2 auth", "yes")) { 1496 torture_result(tctx, TORTURE_FAIL, "Could not set 'client ntlmv2 auth = yes'\n"); 1497 goto fail; 1498 } 1493 1499 1494 1500 if (!torture_open_connection(&cli_nt, tctx, 0)) { … … 1497 1503 1498 1504 if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support", "no")) { 1499 torture_comment(tctx, "Could not set 'nt status support = yes'\n"); 1505 torture_result(tctx, TORTURE_FAIL, "Could not set 'nt status support = no'\n"); 1506 goto fail; 1507 } 1508 if (!lpcfg_set_cmdline(tctx->lp_ctx, "client ntlmv2 auth", "no")) { 1509 torture_result(tctx, TORTURE_FAIL, "Could not set 'client ntlmv2 auth = no'\n"); 1500 1510 goto fail; 1501 1511 } … … 1507 1517 if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support", 1508 1518 nt_status_support ? "yes":"no")) { 1509 torture_comment(tctx, "Could not reset 'nt status support = yes'"); 1519 torture_result(tctx, TORTURE_FAIL, "Could not reset 'nt status support'"); 1520 goto fail; 1521 } 1522 if (!lpcfg_set_cmdline(tctx->lp_ctx, "client ntlmv2 auth", 1523 client_ntlmv2_auth ? "yes":"no")) { 1524 torture_result(tctx, TORTURE_FAIL, "Could not reset 'client ntlmv2 auth'"); 1510 1525 goto fail; 1511 1526 } -
vendor/current/source4/torture/ndr/dfsblob.c
r917 r919 75 75 struct torture_suite *suite = torture_suite_create(ctx, "dfsblob"); 76 76 77 torture_suite_add_ndr_pull_ fn_test(suite, dfs_GetDFSReferral_in, dfs_get_ref_in, NDR_IN, NULL);77 torture_suite_add_ndr_pull_test(suite, dfs_GetDFSReferral_in, dfs_get_ref_in, NULL); 78 78 79 torture_suite_add_ndr_pull_ fn_test(suite, dfs_referral_resp, dfs_get_ref_out2, NDR_BUFFERS|NDR_SCALARS, NULL);79 torture_suite_add_ndr_pull_test(suite, dfs_referral_resp, dfs_get_ref_out2, NULL); 80 80 81 torture_suite_add_ndr_pull_ fn_test(suite, dfs_referral_resp, dfs_get_ref_out, NDR_BUFFERS|NDR_SCALARS,dfs_referral_out_check);81 torture_suite_add_ndr_pull_test(suite, dfs_referral_resp, dfs_get_ref_out,dfs_referral_out_check); 82 82 83 83 return suite; -
vendor/current/source4/torture/ndr/drsblobs.c
r917 r919 116 116 }; 117 117 118 /* these are taken from the trust objects of a w2k8r2 forest, with a 119 * trust relationship between the forest parent and a child domain 120 */ 121 static const char *trustAuthIncoming = 122 "AQAAAAwAAAAcAQAASuQ+RXJdzAECAAAAAAEAAMOWL6UVfVKiJOUsGcT03H" 123 "jHxr2ACsMMOV5ynM617Tp7idNC+c4egdqk4S9YEpvR2YvHmdZdymL6F7QKm8OkXazYZF2r/gZ/bI+" 124 "jkWbsn4O8qyAc3OUKQRZwBbf+lxBW+vM4O3ZpUjz5BSKCcFQgM+MY91yVU8Nji3HNnvGnDquobFAZ" 125 "hxjL+S1l5+QZgkfyfv5mQScGRbU1Lar1xg9G3JznUb7S6pvrBO2nwK8g+KZBfJy5UeULigDH4IWo/" 126 "JmtaEGkKE2uiKIjdsEQd/uwnkouW26XzRc0ulfJnPFftGnT9KIcShPf7DLj/tstmQAAceRMFHJTY3" 127 "PmxoowoK8HUyBK5D5Fcl3MAQIAAAAAAQAAw5YvpRV9UqIk5SwZxPTceMfGvYAKwww5XnKczrXtOnu" 128 "J00L5zh6B2qThL1gSm9HZi8eZ1l3KYvoXtAqbw6RdrNhkXav+Bn9sj6ORZuyfg7yrIBzc5QpBFnAF" 129 "t/6XEFb68zg7dmlSPPkFIoJwVCAz4xj3XJVTw2OLcc2e8acOq6hsUBmHGMv5LWXn5BmCR/J+/mZBJ" 130 "wZFtTUtqvXGD0bcnOdRvtLqm+sE7afAryD4pkF8nLlR5QuKAMfghaj8ma1oQaQoTa6IoiN2wRB3+7" 131 "CeSi5bbpfNFzS6V8mc8V+0adP0ohxKE9/sMuP+2y2ZAABx5EwUclNjc+bGijCgrwdTIA=="; 132 133 static const char *trustAuthOutgoing = 134 "AQAAAAwAAAAcAQAASuQ+RXJdzAECAAAAAAEAAMOWL6UVfVKiJOUsGcT03H" 135 "jHxr2ACsMMOV5ynM617Tp7idNC+c4egdqk4S9YEpvR2YvHmdZdymL6F7QKm8OkXazYZF2r/gZ/bI+" 136 "jkWbsn4O8qyAc3OUKQRZwBbf+lxBW+vM4O3ZpUjz5BSKCcFQgM+MY91yVU8Nji3HNnvGnDquobFAZ" 137 "hxjL+S1l5+QZgkfyfv5mQScGRbU1Lar1xg9G3JznUb7S6pvrBO2nwK8g+KZBfJy5UeULigDH4IWo/" 138 "JmtaEGkKE2uiKIjdsEQd/uwnkouW26XzRc0ulfJnPFftGnT9KIcShPf7DLj/tstmQAAceRMFHJTY3" 139 "PmxoowoK8HUyBK5D5Fcl3MAQIAAAAAAQAAw5YvpRV9UqIk5SwZxPTceMfGvYAKwww5XnKczrXtOnu" 140 "J00L5zh6B2qThL1gSm9HZi8eZ1l3KYvoXtAqbw6RdrNhkXav+Bn9sj6ORZuyfg7yrIBzc5QpBFnAF" 141 "t/6XEFb68zg7dmlSPPkFIoJwVCAz4xj3XJVTw2OLcc2e8acOq6hsUBmHGMv5LWXn5BmCR/J+/mZBJ" 142 "wZFtTUtqvXGD0bcnOdRvtLqm+sE7afAryD4pkF8nLlR5QuKAMfghaj8ma1oQaQoTa6IoiN2wRB3+7" 143 "CeSi5bbpfNFzS6V8mc8V+0adP0ohxKE9/sMuP+2y2ZAABx5EwUclNjc+bGijCgrwdTIA=="; 144 145 118 146 static bool trust_domain_passwords_check_in(struct torture_context *tctx, 119 147 struct trustDomainPasswords *r) … … 155 183 struct torture_suite *suite = torture_suite_create(ctx, "drsblobs"); 156 184 157 torture_suite_add_ndr_pull_fn_test(suite, ForestTrustInfo, forest_trust_info_data_out, NDR_IN, forest_trust_info_check_out); 158 torture_suite_add_ndr_pull_fn_test(suite, trustDomainPasswords, trust_domain_passwords_in, NDR_IN, trust_domain_passwords_check_in); 185 torture_suite_add_ndr_pull_test(suite, ForestTrustInfo, forest_trust_info_data_out, forest_trust_info_check_out); 186 torture_suite_add_ndr_pull_test(suite, trustDomainPasswords, trust_domain_passwords_in, trust_domain_passwords_check_in); 187 188 #if 0 189 torture_suite_add_ndr_pullpush_test(suite, 190 trustAuthInOutBlob, 191 base64_decode_data_blob_talloc(suite, trustAuthIncoming), 192 NULL); 193 194 torture_suite_add_ndr_pullpush_test(suite, 195 trustAuthInOutBlob, 196 base64_decode_data_blob_talloc(suite, trustAuthOutgoing), 197 NULL); 198 #endif 159 199 160 200 return suite; -
vendor/current/source4/torture/ndr/nbt.c
r917 r919 63 63 struct torture_suite *suite = torture_suite_create(ctx, "nbt"); 64 64 65 torture_suite_add_ndr_pull_ fn_test(suite, nbt_netlogon_packet, netlogon_logon_request_req_data, NDR_IN, netlogon_logon_request_req_check);65 torture_suite_add_ndr_pull_test(suite, nbt_netlogon_packet, netlogon_logon_request_req_data, netlogon_logon_request_req_check); 66 66 67 torture_suite_add_ndr_pull_ fn_test(suite, nbt_netlogon_response2, netlogon_logon_request_resp_data, NDR_IN, netlogon_logon_request_resp_check);67 torture_suite_add_ndr_pull_test(suite, nbt_netlogon_response2, netlogon_logon_request_resp_data, netlogon_logon_request_resp_check); 68 68 69 69 return suite; -
vendor/current/source4/torture/ndr/ndr.c
r917 r919 30 30 size_t struct_size; 31 31 ndr_pull_flags_fn_t pull_fn; 32 ndr_push_flags_fn_t push_fn; 32 33 int ndr_flags; 34 int flags; 33 35 }; 34 36 35 static bool wrap_ndr_pull _test(struct torture_context *tctx,36 37 37 static bool wrap_ndr_pullpush_test(struct torture_context *tctx, 38 struct torture_tcase *tcase, 39 struct torture_test *test) 38 40 { 39 41 bool (*check_fn) (struct torture_context *ctx, void *data) = test->fn; 40 42 const struct ndr_pull_test_data *data = (const struct ndr_pull_test_data *)test->data; 41 void *ds = talloc_zero_size(tctx, data->struct_size);42 43 struct ndr_pull *ndr = ndr_pull_init_blob(&(data->data), tctx); 44 void *ds = talloc_zero_size(ndr, data->struct_size); 45 bool ret; 46 uint32_t highest_ofs; 47 48 ndr->flags |= data->flags; 43 49 44 50 ndr->flags |= LIBNDR_FLAG_REF_ALLOC; … … 47 53 "pulling"); 48 54 49 torture_assert(tctx, ndr->offset == ndr->data_size, 55 if (ndr->offset > ndr->relative_highest_offset) { 56 highest_ofs = ndr->offset; 57 } else { 58 highest_ofs = ndr->relative_highest_offset; 59 } 60 61 torture_assert(tctx, highest_ofs == ndr->data_size, 50 62 talloc_asprintf(tctx, 51 "%d unread bytes", ndr->data_size - ndr->offset)); 52 53 if (check_fn != NULL) 54 return check_fn(tctx, ds); 55 else 56 return true; 57 } 58 59 _PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull_test( 60 struct torture_suite *suite, 61 const char *name, ndr_pull_flags_fn_t pull_fn, 62 DATA_BLOB db, 63 size_t struct_size, 64 int ndr_flags, 65 bool (*check_fn) (struct torture_context *ctx, void *data)) 63 "%d unread bytes", ndr->data_size - highest_ofs)); 64 65 if (check_fn != NULL) { 66 ret = check_fn(tctx, ds); 67 } else { 68 ret = true; 69 } 70 71 if (data->push_fn != NULL) { 72 DATA_BLOB outblob; 73 torture_assert_ndr_success(tctx, ndr_push_struct_blob(&outblob, ndr, ds, data->push_fn), "pushing"); 74 torture_assert_data_blob_equal(tctx, outblob, data->data, "ndr push compare"); 75 } 76 77 talloc_free(ndr); 78 return ret; 79 } 80 81 _PUBLIC_ struct torture_test *_torture_suite_add_ndr_pullpush_test( 82 struct torture_suite *suite, 83 const char *name, 84 ndr_pull_flags_fn_t pull_fn, 85 ndr_push_flags_fn_t push_fn, 86 DATA_BLOB db, 87 size_t struct_size, 88 int ndr_flags, 89 int flags, 90 bool (*check_fn) (struct torture_context *ctx, void *data)) 66 91 { 67 92 struct torture_test *test; … … 75 100 test->name = talloc_strdup(test, name); 76 101 test->description = NULL; 77 test->run = wrap_ndr_pull_test; 102 test->run = wrap_ndr_pullpush_test; 103 78 104 data = talloc(test, struct ndr_pull_test_data); 79 105 data->data = db; 80 106 data->ndr_flags = ndr_flags; 107 data->flags = flags; 81 108 data->struct_size = struct_size; 82 109 data->pull_fn = pull_fn; 110 data->push_fn = push_fn; 111 83 112 test->data = data; 84 113 test->fn = check_fn; … … 89 118 return test; 90 119 } 120 91 121 92 122 static bool wrap_ndr_inout_pull_test(struct torture_context *tctx, … … 98 128 void *ds = talloc_zero_size(tctx, data->struct_size); 99 129 struct ndr_pull *ndr; 130 uint32_t highest_ofs; 100 131 101 132 /* handle NDR_IN context */ … … 110 141 "ndr pull of context failed"); 111 142 112 torture_assert(tctx, ndr->offset == ndr->data_size, 113 talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - ndr->offset)); 143 if (ndr->offset > ndr->relative_highest_offset) { 144 highest_ofs = ndr->offset; 145 } else { 146 highest_ofs = ndr->relative_highest_offset; 147 } 148 149 torture_assert(tctx, highest_ofs == ndr->data_size, 150 talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - highest_ofs)); 114 151 115 152 talloc_free(ndr); … … 126 163 "ndr pull failed"); 127 164 128 torture_assert(tctx, ndr->offset == ndr->data_size, 129 talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - ndr->offset)); 165 if (ndr->offset > ndr->relative_highest_offset) { 166 highest_ofs = ndr->offset; 167 } else { 168 highest_ofs = ndr->relative_highest_offset; 169 } 170 171 torture_assert(tctx, highest_ofs == ndr->data_size, 172 talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - highest_ofs)); 130 173 131 174 talloc_free(ndr); -
vendor/current/source4/torture/ndr/ndr.h
r917 r919 25 25 #include "libcli/security/security.h" 26 26 27 _PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull _test(27 _PUBLIC_ struct torture_test *_torture_suite_add_ndr_pullpush_test( 28 28 struct torture_suite *suite, 29 const char *name, ndr_pull_flags_fn_t fn, 29 const char *name, 30 ndr_pull_flags_fn_t pull_fn, 31 ndr_push_flags_fn_t push_fn, 30 32 DATA_BLOB db, 31 33 size_t struct_size, 32 34 int ndr_flags, 35 int flags, 33 36 bool (*check_fn) (struct torture_context *, void *data)); 34 37 … … 42 45 43 46 #define torture_suite_add_ndr_pull_test(suite,name,data,check_fn) \ 44 _torture_suite_add_ndr_pull _test(suite, #name, \45 (ndr_pull_flags_fn_t)ndr_pull_ ## name, data_blob_talloc(suite,data, sizeof(data)), \46 sizeof(struct name), NDR_SCALARS|NDR_BUFFERS, (bool (*) (struct torture_context *, void *)) check_fn);47 _torture_suite_add_ndr_pullpush_test(suite, #name, \ 48 (ndr_pull_flags_fn_t)ndr_pull_ ## name, NULL, data_blob_const(data, sizeof(data)), \ 49 sizeof(struct name), NDR_SCALARS|NDR_BUFFERS, 0, (bool (*) (struct torture_context *, void *)) check_fn); 47 50 48 51 #define torture_suite_add_ndr_pull_fn_test(suite,name,data,flags,check_fn) \ 49 _torture_suite_add_ndr_pull_test(suite, #name "_" #flags, \ 50 (ndr_pull_flags_fn_t)ndr_pull_ ## name, data_blob_talloc(suite, data, sizeof(data)), \ 51 sizeof(struct name), flags, (bool (*) (struct torture_context *, void *)) check_fn); 52 _torture_suite_add_ndr_pullpush_test(suite, #name "_" #flags, \ 53 (ndr_pull_flags_fn_t)ndr_pull_ ## name, NULL, data_blob_const(data, sizeof(data)), \ 54 sizeof(struct name), flags, 0, (bool (*) (struct torture_context *, void *)) check_fn); 55 56 #define torture_suite_add_ndr_pull_fn_test_flags(suite,name,data,flags,flags2,check_fn) \ 57 _torture_suite_add_ndr_pullpush_test(suite, #name "_" #flags "_" #flags2, \ 58 (ndr_pull_flags_fn_t)ndr_pull_ ## name, NULL, data_blob_const(data, sizeof(data)), \ 59 sizeof(struct name), flags, flags2, (bool (*) (struct torture_context *, void *)) check_fn); 60 61 #define torture_suite_add_ndr_pullpush_test(suite,name,data_blob,check_fn) \ 62 _torture_suite_add_ndr_pullpush_test(suite, #name, \ 63 (ndr_pull_flags_fn_t)ndr_pull_ ## name, \ 64 (ndr_push_flags_fn_t)ndr_push_ ## name, \ 65 data_blob, \ 66 sizeof(struct name), NDR_SCALARS|NDR_BUFFERS, 0, (bool (*) (struct torture_context *, void *)) check_fn); 52 67 53 68 #define torture_suite_add_ndr_pull_io_test(suite,name,data_in,data_out,check_fn_out) \ 54 69 _torture_suite_add_ndr_pull_inout_test(suite, #name "_INOUT", \ 55 70 (ndr_pull_flags_fn_t)ndr_pull_ ## name, \ 56 data_blob_ talloc(suite,data_in, sizeof(data_in)), \57 data_blob_ talloc(suite,data_out, sizeof(data_out)), \71 data_blob_const(data_in, sizeof(data_in)), \ 72 data_blob_const(data_out, sizeof(data_out)), \ 58 73 sizeof(struct name), \ 59 74 (bool (*) (struct torture_context *, void *)) check_fn_out); -
vendor/current/source4/torture/ndr/ntlmssp.c
r917 r919 112 112 struct torture_suite *suite = torture_suite_create(ctx, "ntlmssp"); 113 113 114 torture_suite_add_ndr_pull_fn_test(suite, NEGOTIATE_MESSAGE, ntlmssp_NEGOTIATE_MESSAGE_data, NDR_IN, ntlmssp_NEGOTIATE_MESSAGE_check); 115 /* torture_suite_add_ndr_pull_fn_test(suite, CHALLENGE_MESSAGE, ntlmssp_CHALLENGE_MESSAGE_data, NDR_IN, ntlmssp_CHALLENGE_MESSAGE_check); 116 torture_suite_add_ndr_pull_fn_test(suite, AUTHENTICATE_MESSAGE, ntlmssp_AUTHENTICATE_MESSAGE_data, NDR_IN, ntlmssp_AUTHENTICATE_MESSAGE_check); */ 117 114 torture_suite_add_ndr_pull_test(suite, NEGOTIATE_MESSAGE, ntlmssp_NEGOTIATE_MESSAGE_data, ntlmssp_NEGOTIATE_MESSAGE_check); 115 #if 0 116 torture_suite_add_ndr_pull_test(suite, CHALLENGE_MESSAGE, ntlmssp_CHALLENGE_MESSAGE_data, ntlmssp_CHALLENGE_MESSAGE_check); 117 torture_suite_add_ndr_pull_test(suite, AUTHENTICATE_MESSAGE, ntlmssp_AUTHENTICATE_MESSAGE_data, ntlmssp_AUTHENTICATE_MESSAGE_check); 118 #endif 118 119 return suite; 119 120 } -
vendor/current/source4/torture/raw/samba3misc.c
r917 r919 341 341 TALLOC_CTX *mem_ctx; 342 342 bool nt_status_support; 343 bool client_ntlmv2_auth; 343 344 344 345 if (!(mem_ctx = talloc_init("torture_samba3_badpath"))) { … … 348 349 349 350 nt_status_support = lpcfg_nt_status_support(torture->lp_ctx); 350 351 if (!lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "yes")) { 352 printf("Could not set 'nt status support = yes'\n"); 353 goto fail; 354 } 351 client_ntlmv2_auth = lpcfg_client_ntlmv2_auth(torture->lp_ctx); 352 353 torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "yes"), ret, fail, "Could not set 'nt status support = yes'\n"); 354 torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "client ntlmv2 auth", "yes"), ret, fail, "Could not set 'client ntlmv2 auth = yes'\n"); 355 355 356 356 if (!torture_open_connection(&cli_nt, torture, 0)) { … … 358 358 } 359 359 360 if (!lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "no")) { 361 printf("Could not set 'nt status support = yes'\n"); 362 goto fail; 363 } 360 torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "no"), ret, fail, "Could not set 'nt status support = no'\n"); 361 torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "client ntlmv2 auth", "no"), ret, fail, "Could not set 'client ntlmv2 auth = no'\n"); 364 362 365 363 if (!torture_open_connection(&cli_dos, torture, 1)) { … … 374 372 375 373 smbcli_deltree(cli_nt->tree, dirname); 374 torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "nt status support", 375 nt_status_support ? "yes":"no"), 376 ret, fail, "Could not set 'nt status support' back to where it was\n"); 377 torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "client ntlmv2 auth", 378 client_ntlmv2_auth ? "yes":"no"), 379 ret, fail, "Could not set 'client ntlmv2 auth' back to where it was\n"); 376 380 377 381 status = smbcli_mkdir(cli_nt->tree, dirname); -
vendor/current/source4/torture/rpc/rpc.c
r917 r919 502 502 torture_suite_add_suite(suite, torture_rpc_samr_passwords_badpwdcount(suite)); 503 503 torture_suite_add_suite(suite, torture_rpc_samr_passwords_lockout(suite)); 504 torture_suite_add_suite(suite, torture_rpc_samr_passwords_validate(suite)); 504 505 torture_suite_add_suite(suite, torture_rpc_samr_user_privileges(suite)); 505 506 torture_suite_add_suite(suite, torture_rpc_samr_large_dc(suite)); -
vendor/current/source4/torture/rpc/samba3rpc.c
r917 r919 1123 1123 names_blob = NTLMv2_generate_names_blob( 1124 1124 mem_ctx, 1125 cli_credentials_get_workstation( user_creds),1126 cli_credentials_get_domain( user_creds));1125 cli_credentials_get_workstation(wks_creds), 1126 cli_credentials_get_domain(wks_creds)); 1127 1127 status = cli_credentials_get_ntlm_response( 1128 1128 user_creds, mem_ctx, &flags, chal, names_blob, -
vendor/current/source4/torture/rpc/samr.c
r860 r919 7939 7939 7940 7940 7941 static bool test_samr_ValidatePassword(struct dcerpc_pipe *p,7942 struct torture_context *tctx)7941 static bool test_samr_ValidatePassword(struct torture_context *tctx, 7942 struct dcerpc_pipe *p) 7943 7943 { 7944 7944 struct samr_ValidatePassword r; … … 7952 7952 torture_comment(tctx, "Testing samr_ValidatePassword\n"); 7953 7953 7954 if (p->conn->transport.transport != NCACN_IP_TCP) { 7955 torture_comment(tctx, "samr_ValidatePassword only should succeed over NCACN_IP_TCP!\n"); 7956 } 7957 7954 7958 ZERO_STRUCT(r); 7955 7959 r.in.level = NetValidatePasswordReset; … … 8075 8079 ret &= test_samr_handle_Close(b, torture, &ctx->handle); 8076 8080 8077 ret &= test_samr_ValidatePassword(p, torture);8078 8079 8081 return ret; 8080 8082 } … … 8371 8373 } 8372 8374 8373 8375 struct torture_suite *torture_rpc_samr_passwords_validate(TALLOC_CTX *mem_ctx) 8376 { 8377 struct torture_suite *suite = torture_suite_create(mem_ctx, "samr.passwords.validate"); 8378 struct torture_rpc_tcase *tcase; 8379 8380 tcase = torture_suite_add_rpc_iface_tcase(suite, "samr", 8381 &ndr_table_samr); 8382 torture_rpc_tcase_add_test(tcase, "validate", 8383 test_samr_ValidatePassword); 8384 8385 return suite; 8386 }
Note:
See TracChangeset
for help on using the changeset viewer.