mirror of
https://github.com/samba-team/samba.git
synced 2025-01-31 01:48:16 +03:00
libcli/auth: make use of netlogon_creds_cli_store_internal() in netlogon_creds_cli_auth_srvauth_done()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> (cherry picked from commit 69cb9aea67de0613f467f7ce2d460364ff2be241)
This commit is contained in:
parent
ced6cbfa6b
commit
6f1d556b40
@ -1417,9 +1417,6 @@ static void netlogon_creds_cli_auth_srvauth_done(struct tevent_req *subreq)
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
NTSTATUS result;
|
NTSTATUS result;
|
||||||
bool ok;
|
bool ok;
|
||||||
enum ndr_err_code ndr_err;
|
|
||||||
DATA_BLOB blob;
|
|
||||||
TDB_DATA data;
|
|
||||||
bool downgraded;
|
bool downgraded;
|
||||||
|
|
||||||
if (state->try_auth3) {
|
if (state->try_auth3) {
|
||||||
@ -1518,20 +1515,8 @@ static void netlogon_creds_cli_auth_srvauth_done(struct tevent_req *subreq)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ndr_err = ndr_push_struct_blob(&blob, state, state->creds,
|
status = netlogon_creds_cli_store_internal(state->context,
|
||||||
(ndr_push_flags_fn_t)ndr_push_netlogon_creds_CredentialState);
|
state->creds);
|
||||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|
||||||
status = ndr_map_error2ntstatus(ndr_err);
|
|
||||||
tevent_req_nterror(req, status);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
data.dptr = blob.data;
|
|
||||||
data.dsize = blob.length;
|
|
||||||
|
|
||||||
status = dbwrap_store(state->context->db.ctx,
|
|
||||||
state->context->db.key_data,
|
|
||||||
data, TDB_REPLACE);
|
|
||||||
if (tevent_req_nterror(req, status)) {
|
if (tevent_req_nterror(req, status)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user