diff options
author | Simo Sorce <idra@samba.org> | 2008-06-14 11:24:17 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-06-14 11:59:19 -0400 |
commit | 929adc9efa5cf985f0585214d30d18521aa1a821 (patch) | |
tree | 2a0f3e4dedc1336fb29aa4f36f302f29c5439f55 /source4/torture | |
parent | 2aba4107915611b223daa8c27c52352f57b25bbc (diff) | |
download | samba-929adc9efa5cf985f0585214d30d18521aa1a821.tar.gz samba-929adc9efa5cf985f0585214d30d18521aa1a821.tar.bz2 samba-929adc9efa5cf985f0585214d30d18521aa1a821.zip |
Make up the right dependencies now that ldb depends on libevents
(This used to be commit 3b8eec7ca334528cad3cdcd5e3fc5ee555d8d0e0)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/ldap/cldap.c | 2 | ||||
-rw-r--r-- | source4/torture/libnet/libnet_BecomeDC.c | 4 | ||||
-rw-r--r-- | source4/torture/nbt/dgram.c | 4 | ||||
-rw-r--r-- | source4/torture/rpc/drsuapi.c | 8 | ||||
-rw-r--r-- | source4/torture/rpc/drsuapi_cracknames.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/join.c | 4 | ||||
-rw-r--r-- | source4/torture/rpc/lsa.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/rpc.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/rpc.h | 2 | ||||
-rw-r--r-- | source4/torture/rpc/samlogon.c | 8 | ||||
-rw-r--r-- | source4/torture/rpc/samr_accessmask.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/samsync.c | 6 | ||||
-rw-r--r-- | source4/torture/rpc/schannel.c | 8 | ||||
-rw-r--r-- | source4/torture/rpc/testjoin.c | 18 |
14 files changed, 37 insertions, 35 deletions
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c index 5d4acd581b..1631297793 100644 --- a/source4/torture/ldap/cldap.c +++ b/source4/torture/ldap/cldap.c @@ -256,7 +256,7 @@ static void cldap_dump_results(struct cldap_search *search) } /* we need a ldb context to use ldb_ldif_write_file() */ - ldb = ldb_init(NULL); + ldb = ldb_init(NULL, NULL); ZERO_STRUCT(ldif); ldif.msg = ldap_msg_to_ldb(ldb, ldb, search->out.response); diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c index bc92b4ebc2..97a5ca9d71 100644 --- a/source4/torture/libnet/libnet_BecomeDC.c +++ b/source4/torture/libnet/libnet_BecomeDC.c @@ -593,7 +593,7 @@ bool torture_net_become_dc(struct torture_context *torture) s->ctx = libnet_context_init(torture->ev, torture->lp_ctx); s->ctx->cred = cmdline_credentials; - s->ldb = ldb_init(s); + s->ldb = ldb_init(s, torture->ev); ZERO_STRUCT(b); b.in.domain_dns_name = torture_join_dom_dns_name(s->tj); @@ -691,7 +691,7 @@ cleanup: } /* Leave domain. */ - torture_leave_domain(s->tj); + torture_leave_domain(torture, s->tj); talloc_free(s); return ret; diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c index 887c6f32ab..665a08bd5c 100644 --- a/source4/torture/nbt/dgram.c +++ b/source4/torture/nbt/dgram.c @@ -413,7 +413,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx) torture_assert_int_equal(tctx, response->samlogon.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN, "Got incorrect netlogon response command"); - torture_leave_domain(join_ctx); + torture_leave_domain(tctx, join_ctx); return true; } @@ -604,7 +604,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx) torture_assert_int_equal(tctx, response->response_type, NETLOGON_GET_PDC, "Got incorrect type of ntlogon response"); torture_assert_int_equal(tctx, response->get_pdc.command, NETLOGON_RESPONSE_FROM_PDC, "Got incorrect ntlogon response command"); - torture_leave_domain(join_ctx); + torture_leave_domain(tctx, join_ctx); /* setup (another) temporary mailslot listener for replies */ dgmslot = dgram_mailslot_temp(dgmsock, NBT_MAILSLOT_GETDC, diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c index 5e01c2050c..bbdb73ed55 100644 --- a/source4/torture/rpc/drsuapi.c +++ b/source4/torture/rpc/drsuapi.c @@ -709,7 +709,7 @@ bool torture_rpc_drsuapi(struct torture_context *torture) &p, &ndr_table_drsuapi); if (!NT_STATUS_IS_OK(status)) { - torture_leave_domain(priv.join); + torture_leave_domain(torture, priv.join); torture_fail(torture, "Unable to connect to DRSUAPI pipe"); } @@ -733,7 +733,7 @@ bool torture_rpc_drsuapi(struct torture_context *torture) ret &= test_DsUnbind(p, torture, &priv); - torture_leave_domain(priv.join); + torture_leave_domain(torture, priv.join); return ret; } @@ -761,7 +761,7 @@ bool torture_rpc_drsuapi_cracknames(struct torture_context *torture) &p, &ndr_table_drsuapi); if (!NT_STATUS_IS_OK(status)) { - torture_leave_domain(priv.join); + torture_leave_domain(torture, priv.join); torture_fail(torture, "Unable to connect to DRSUAPI pipe"); } @@ -776,7 +776,7 @@ bool torture_rpc_drsuapi_cracknames(struct torture_context *torture) ret &= test_DsUnbind(p, torture, &priv); } - torture_leave_domain(priv.join); + torture_leave_domain(torture, priv.join); return ret; } diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c index 89d9b7bd34..fbda69df57 100644 --- a/source4/torture/rpc/drsuapi_cracknames.c +++ b/source4/torture/rpc/drsuapi_cracknames.c @@ -325,7 +325,7 @@ bool test_DsCrackNames(struct torture_context *tctx, return ret; } - ldb = ldb_init(mem_ctx); + ldb = ldb_init(mem_ctx, tctx->ev); realm_dn_str = r.out.ctr.ctr1->array[0].result_name; realm_dn = ldb_dn_new(mem_ctx, ldb, realm_dn_str); diff --git a/source4/torture/rpc/join.c b/source4/torture/rpc/join.c index cd5eb32fa8..77da32d572 100644 --- a/source4/torture/rpc/join.c +++ b/source4/torture/rpc/join.c @@ -48,7 +48,7 @@ bool torture_rpc_join(struct torture_context *torture) smbcli_tdis(cli); /* Leave domain. */ - torture_leave_domain(tj); + torture_leave_domain(torture, tj); /* Join domain as a domain controller. */ tj = torture_join_domain(torture, TORTURE_NETBIOS_NAME, @@ -75,7 +75,7 @@ bool torture_rpc_join(struct torture_context *torture) smbcli_tdis(cli); /* Leave domain. */ - torture_leave_domain(tj); + torture_leave_domain(torture, tj); return true; } diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 04d13a97c1..a4e702f759 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -2280,7 +2280,7 @@ bool torture_rpc_lsa(struct torture_context *tctx) ret = false; } - torture_leave_domain(join); + torture_leave_domain(tctx, join); } else { if (!test_many_LookupSids(p, tctx, handle)) { diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c index acc1220ccc..23867f2a77 100644 --- a/source4/torture/rpc/rpc.c +++ b/source4/torture/rpc/rpc.c @@ -33,7 +33,7 @@ static bool torture_rpc_teardown (struct torture_context *tcase, struct torture_rpc_tcase_data *tcase_data = (struct torture_rpc_tcase_data *)data; if (tcase_data->join_ctx != NULL) - torture_leave_domain(tcase_data->join_ctx); + torture_leave_domain(tcase, tcase_data->join_ctx); talloc_free(tcase_data); return true; } diff --git a/source4/torture/rpc/rpc.h b/source4/torture/rpc/rpc.h index 48db814b7a..29b1ebee54 100644 --- a/source4/torture/rpc/rpc.h +++ b/source4/torture/rpc/rpc.h @@ -51,7 +51,7 @@ struct test_join *torture_join_domain(struct torture_context *tctx, uint32_t acct_flags, struct cli_credentials **machine_credentials); const struct dom_sid *torture_join_sid(struct test_join *join); -void torture_leave_domain(struct test_join *join); +void torture_leave_domain(struct torture_context *tctx, struct test_join *join); struct torture_rpc_tcase *torture_suite_add_rpc_iface_tcase(struct torture_suite *suite, const char *name, const struct ndr_interface_table *table); diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c index ab3283a952..e2558ff0a9 100644 --- a/source4/torture/rpc/samlogon.c +++ b/source4/torture/rpc/samlogon.c @@ -1847,9 +1847,9 @@ bool torture_rpc_samlogon(struct torture_context *torture) failed: talloc_free(mem_ctx); - torture_leave_domain(join_ctx); - torture_leave_domain(user_ctx); - torture_leave_domain(user_ctx_wrong_wks); - torture_leave_domain(user_ctx_wrong_time); + torture_leave_domain(torture, join_ctx); + torture_leave_domain(torture, user_ctx); + torture_leave_domain(torture, user_ctx_wrong_wks); + torture_leave_domain(torture, user_ctx_wrong_time); return ret; } diff --git a/source4/torture/rpc/samr_accessmask.c b/source4/torture/rpc/samr_accessmask.c index 97fe16101d..f496f6300c 100644 --- a/source4/torture/rpc/samr_accessmask.c +++ b/source4/torture/rpc/samr_accessmask.c @@ -639,7 +639,7 @@ static bool test_samr_connect(struct torture_context *tctx, /* remove the test user */ - torture_leave_domain(testuser); + torture_leave_domain(tctx, testuser); return ret; } diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c index 9705f7b0de..7114756460 100644 --- a/source4/torture/rpc/samsync.c +++ b/source4/torture/rpc/samsync.c @@ -1629,9 +1629,9 @@ bool torture_rpc_samsync(struct torture_context *torture) } failed: - torture_leave_domain(join_ctx); - torture_leave_domain(join_ctx2); - torture_leave_domain(user_ctx); + torture_leave_domain(torture, join_ctx); + torture_leave_domain(torture, join_ctx2); + torture_leave_domain(torture, user_ctx); talloc_free(mem_ctx); diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c index a8f70b2ea9..fae0093e4d 100644 --- a/source4/torture/rpc/schannel.c +++ b/source4/torture/rpc/schannel.c @@ -385,7 +385,7 @@ static bool test_schannel(struct torture_context *tctx, torture_assert(tctx, test_netlogon_ops(p_netlogon3, tctx, credentials, creds), "Failed to processed NOT schannel secured NETLOGON ops without new ServerAuth"); - torture_leave_domain(join_ctx); + torture_leave_domain(tctx, join_ctx); return true; } @@ -482,7 +482,7 @@ bool torture_rpc_schannel2(struct torture_context *torture) if (!test_netlogon_ex_ops(p2, torture, credentials2, NULL)) return false; - torture_leave_domain(join_ctx); + torture_leave_domain(torture, join_ctx); return true; } @@ -829,7 +829,7 @@ bool torture_rpc_schannel_bench1(struct torture_context *torture) (unsigned long long)s->total, (unsigned)s->total/s->timelimit); - torture_leave_domain(s->join_ctx1); - torture_leave_domain(s->join_ctx2); + torture_leave_domain(torture, s->join_ctx1); + torture_leave_domain(torture, s->join_ctx2); return true; } diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c index 51efd99bd8..9fd9d2f0c6 100644 --- a/source4/torture/rpc/testjoin.c +++ b/source4/torture/rpc/testjoin.c @@ -246,7 +246,7 @@ again: if (!NT_STATUS_IS_OK(status)) { printf("SetUserInfo level %u - no session key - %s\n", s.in.level, nt_errstr(status)); - torture_leave_domain(join); + torture_leave_domain(torture, join); goto failed; } @@ -294,7 +294,7 @@ again: return join; failed: - torture_leave_domain(join); + torture_leave_domain(torture, join); return NULL; } @@ -425,7 +425,9 @@ struct policy_handle *torture_join_samr_user_policy(struct test_join *join) return &join->user_handle; } -static NTSTATUS torture_leave_ads_domain(TALLOC_CTX *mem_ctx, struct libnet_JoinDomain *libnet_r) +static NTSTATUS torture_leave_ads_domain(struct torture_context *torture, + TALLOC_CTX *mem_ctx, + struct libnet_JoinDomain *libnet_r) { int rtn; TALLOC_CTX *tmp_ctx; @@ -446,7 +448,7 @@ static NTSTATUS torture_leave_ads_domain(TALLOC_CTX *mem_ctx, struct libnet_Join return NT_STATUS_NO_MEMORY; } - ldb_ctx = ldb_init(tmp_ctx); + ldb_ctx = ldb_init(tmp_ctx, torture->ev); if (!ldb_ctx) { libnet_r->out.error_string = NULL; talloc_free(tmp_ctx); @@ -494,7 +496,7 @@ static NTSTATUS torture_leave_ads_domain(TALLOC_CTX *mem_ctx, struct libnet_Join leave the domain, deleting the machine acct */ -_PUBLIC_ void torture_leave_domain(struct test_join *join) +_PUBLIC_ void torture_leave_domain(struct torture_context *torture, struct test_join *join) { struct samr_DeleteUser d; NTSTATUS status; @@ -504,8 +506,8 @@ _PUBLIC_ void torture_leave_domain(struct test_join *join) } d.in.user_handle = &join->user_handle; d.out.user_handle = &join->user_handle; - - /* Delete machine account */ + + /* Delete machine account */ status = dcerpc_samr_DeleteUser(join->p, join, &d); if (!NT_STATUS_IS_OK(status)) { printf("Delete of machine account %s failed\n", @@ -516,7 +518,7 @@ _PUBLIC_ void torture_leave_domain(struct test_join *join) } if (join->libnet_r) { - status = torture_leave_ads_domain(join, join->libnet_r); + status = torture_leave_ads_domain(torture, join, join->libnet_r); } talloc_free(join); |