diff options
author | Simo Sorce <ssorce@redhat.com> | 2010-02-27 19:13:02 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-04-12 09:22:12 -0400 |
commit | 0995e4cc173577122bea5a1d4698262fd0e9c200 (patch) | |
tree | eb55bc828d63bb01e7992495a6d0bf753a76030f /src/providers/ipa | |
parent | 79c090e8c25ac13454b9f12f4d6dc635029a0c9d (diff) | |
download | sssd-0995e4cc173577122bea5a1d4698262fd0e9c200.tar.gz sssd-0995e4cc173577122bea5a1d4698262fd0e9c200.tar.bz2 sssd-0995e4cc173577122bea5a1d4698262fd0e9c200.zip |
sysdb: convert sysdb_search_entry and sysdb_delete_recursive
Diffstat (limited to 'src/providers/ipa')
-rw-r--r-- | src/providers/ipa/ipa_access.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c index 55a7133c..5cf9bf49 100644 --- a/src/providers/ipa/ipa_access.c +++ b/src/providers/ipa/ipa_access.c @@ -823,7 +823,6 @@ struct hbac_get_rules_state { static void hbac_get_rules_connect_done(struct tevent_req *subreq); static void hbac_rule_get_done(struct tevent_req *subreq); static void hbac_rule_sysdb_transaction_started(struct tevent_req *subreq); -static void hbac_rule_sysdb_delete_done(struct tevent_req *subreq); static void hbac_rule_store_prepare(struct tevent_req *req); static void hbac_rule_store_done(struct tevent_req *subreq); @@ -1112,14 +1111,14 @@ static void hbac_rule_sysdb_transaction_started(struct tevent_req *subreq) ret = ENOMEM; goto fail; } - subreq = sysdb_delete_recursive_send(state, state->ev, state->handle, - hbac_base_dn, true); - if (subreq == NULL) { + ret = sysdb_delete_recursive(state, state->sysdb, hbac_base_dn, true); + if (ret) { DEBUG(1, ("sysdb_delete_recursive_send failed.\n")); - ret = ENOMEM; goto fail; } - tevent_req_set_callback(subreq, hbac_rule_sysdb_delete_done, req); + + state->current_item = 0; + hbac_rule_store_prepare(req); return; fail: @@ -1127,25 +1126,6 @@ fail: return; } -static void hbac_rule_sysdb_delete_done(struct tevent_req *subreq) -{ - struct tevent_req *req = tevent_req_callback_data(subreq, - struct tevent_req); - struct hbac_get_rules_state *state = tevent_req_data(req, - struct hbac_get_rules_state); - int ret; - - ret = sysdb_delete_recursive_recv(subreq); - talloc_zfree(subreq); - if (ret != EOK) { - tevent_req_error(req, ret); - return; - } - - state->current_item = 0; - hbac_rule_store_prepare(req); -} - static void hbac_rule_store_prepare(struct tevent_req *req) { struct hbac_get_rules_state *state = tevent_req_data(req, |