netlogon_creds_cli: use dbwrap_purge instead of dbwrap_delete where appropriate
authorMichael Adam <obnox@samba.org>
Thu, 25 Feb 2016 15:15:04 +0000 (16:15 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 1 Mar 2016 20:50:24 +0000 (21:50 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
libcli/auth/netlogon_creds_cli.c

index 7c867cff08b5912364a11bf0b488700b9813d554..38b1351f59178e7165f8a09613cea73d1f826da2 100644 (file)
@@ -1031,11 +1031,8 @@ struct tevent_req *netlogon_creds_cli_auth_send(TALLOC_CTX *mem_ctx,
                return req;
        }
 
-       status = dbwrap_delete(state->context->db.ctx,
-                              state->context->db.key_data);
-       if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
-               status = NT_STATUS_OK;
-       }
+       status = dbwrap_purge(state->context->db.ctx,
+                             state->context->db.key_data);
        if (tevent_req_nterror(req, status)) {
                return tevent_req_post(req, ev);
        }
@@ -1065,11 +1062,8 @@ static void netlogon_creds_cli_auth_locked(struct tevent_req *subreq)
        }
        state->locked_state->is_glocked = true;
 
-       status = dbwrap_delete(state->context->db.ctx,
-                              state->context->db.key_data);
-       if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
-               status = NT_STATUS_OK;
-       }
+       status = dbwrap_purge(state->context->db.ctx,
+                             state->context->db.key_data);
        if (tevent_req_nterror(req, status)) {
                return;
        }