mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +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:
parent
c0e28638fa
commit
dac48cf2b9
@ -635,6 +635,14 @@ NTSTATUS netlogon_creds_cli_store(struct netlogon_creds_cli_context *context,
|
||||
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,
|
||||
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;
|
||||
}
|
||||
|
||||
status = dbwrap_delete(context->db.ctx,
|
||||
context->db.key_data);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
return NT_STATUS_OK;
|
||||
status = netlogon_creds_cli_delete_internal(context);
|
||||
return status;
|
||||
}
|
||||
|
||||
struct netlogon_creds_cli_lock_state {
|
||||
|
Loading…
Reference in New Issue
Block a user