1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

netlogon_creds_cli: Factor out netlogon_creds_cli_delete_internal

In a future commit we'll need a version that does not check for
context->db.locked_state

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Volker Lendecke 2017-09-13 09:33:56 -07:00
parent c0e28638fa
commit dac48cf2b9

View File

@ -635,6 +635,14 @@ NTSTATUS netlogon_creds_cli_store(struct netlogon_creds_cli_context *context,
return status; return status;
} }
static NTSTATUS netlogon_creds_cli_delete_internal(
struct netlogon_creds_cli_context *context)
{
NTSTATUS status;
status = dbwrap_delete(context->db.ctx, context->db.key_data);
return status;
}
NTSTATUS netlogon_creds_cli_delete(struct netlogon_creds_cli_context *context, NTSTATUS netlogon_creds_cli_delete(struct netlogon_creds_cli_context *context,
struct netlogon_creds_CredentialState *creds) struct netlogon_creds_CredentialState *creds)
{ {
@ -654,13 +662,8 @@ NTSTATUS netlogon_creds_cli_delete(struct netlogon_creds_cli_context *context,
return NT_STATUS_INVALID_PAGE_PROTECTION; return NT_STATUS_INVALID_PAGE_PROTECTION;
} }
status = dbwrap_delete(context->db.ctx, status = netlogon_creds_cli_delete_internal(context);
context->db.key_data); return status;
if (!NT_STATUS_IS_OK(status)) {
return status;
}
return NT_STATUS_OK;
} }
struct netlogon_creds_cli_lock_state { struct netlogon_creds_cli_lock_state {