summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-09-13 09:33:56 -0700
committerVolker Lendecke <vl@samba.org>2017-09-25 09:43:12 +0200
commitdac48cf2b9d857b3da9454d612103d44cfe49c5a (patch)
treee5a3917af5f5bd5c3126a5efaa5a43bcc0ba26d9 /libcli
parentc0e28638fa839958d3e621be53243c2c513f94b4 (diff)
downloadsamba-dac48cf2b9d857b3da9454d612103d44cfe49c5a.tar.gz
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>
Diffstat (limited to 'libcli')
-rw-r--r--libcli/auth/netlogon_creds_cli.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c
index f1aa8d03ca5..c3b302addc4 100644
--- a/libcli/auth/netlogon_creds_cli.c
+++ b/libcli/auth/netlogon_creds_cli.c
@@ -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 {