1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

netlogon_creds_cli: Add netlogon_creds_cli_delete_lck

Like netlogon_creds_cli_delete, protected by netlogon_creds_cli_lck
instead of netlogon_creds_cli_lock.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Volker Lendecke 2017-09-15 19:39:01 -07:00
parent 3e72a12daf
commit d61545a5b3
2 changed files with 15 additions and 0 deletions

View File

@ -677,6 +677,19 @@ static NTSTATUS netlogon_creds_cli_delete_internal(
return status;
}
NTSTATUS netlogon_creds_cli_delete_lck(
struct netlogon_creds_cli_context *context)
{
NTSTATUS status;
if (context->db.lock != NETLOGON_CREDS_CLI_LCK_EXCLUSIVE) {
return NT_STATUS_NOT_LOCKED;
}
status = netlogon_creds_cli_delete_internal(context);
return status;
}
NTSTATUS netlogon_creds_cli_delete(struct netlogon_creds_cli_context *context,
struct netlogon_creds_CredentialState *creds)
{

View File

@ -65,6 +65,8 @@ NTSTATUS netlogon_creds_cli_store(struct netlogon_creds_cli_context *context,
struct netlogon_creds_CredentialState *creds);
NTSTATUS netlogon_creds_cli_delete(struct netlogon_creds_cli_context *context,
struct netlogon_creds_CredentialState *creds);
NTSTATUS netlogon_creds_cli_delete_lck(
struct netlogon_creds_cli_context *context);
struct tevent_req *netlogon_creds_cli_lock_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,