summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-11-13 09:52:53 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-11-14 08:01:44 +0000
commit7c7dc855ba982a37cb5040752ca473aab3446d6c (patch)
tree510f62d63f55bd66f94c9d78356240aeea2d783f
parent0ed92e3e60684bfb02b01479d985535d525a5be5 (diff)
downloadsamba-7c7dc855ba982a37cb5040752ca473aab3446d6c.tar.gz
libcli:auth: Return NTSTATUS for netlogon_creds_client_authenticator()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14195 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--libcli/auth/credentials.c7
-rw-r--r--libcli/auth/proto.h5
2 files changed, 8 insertions, 4 deletions
diff --git a/libcli/auth/credentials.c b/libcli/auth/credentials.c
index 359ba8c4b90..e5bf2c4703c 100644
--- a/libcli/auth/credentials.c
+++ b/libcli/auth/credentials.c
@@ -513,8 +513,9 @@ struct netlogon_creds_CredentialState *netlogon_creds_client_init_session_key(TA
produce the next authenticator in the sequence ready to send to
the server
*/
-void netlogon_creds_client_authenticator(struct netlogon_creds_CredentialState *creds,
- struct netr_Authenticator *next)
+NTSTATUS
+netlogon_creds_client_authenticator(struct netlogon_creds_CredentialState *creds,
+ struct netr_Authenticator *next)
{
uint32_t t32n = (uint32_t)time(NULL);
@@ -543,6 +544,8 @@ void netlogon_creds_client_authenticator(struct netlogon_creds_CredentialState *
next->cred = creds->client;
next->timestamp = creds->sequence;
+
+ return NT_STATUS_OK;
}
/*
diff --git a/libcli/auth/proto.h b/libcli/auth/proto.h
index 52a33d8d457..eef1c8dc095 100644
--- a/libcli/auth/proto.h
+++ b/libcli/auth/proto.h
@@ -40,8 +40,9 @@ struct netlogon_creds_CredentialState *netlogon_creds_client_init(TALLOC_CTX *me
uint32_t negotiate_flags);
struct netlogon_creds_CredentialState *netlogon_creds_client_init_session_key(TALLOC_CTX *mem_ctx,
const uint8_t session_key[16]);
-void netlogon_creds_client_authenticator(struct netlogon_creds_CredentialState *creds,
- struct netr_Authenticator *next);
+NTSTATUS
+netlogon_creds_client_authenticator(struct netlogon_creds_CredentialState *creds,
+ struct netr_Authenticator *next);
bool netlogon_creds_client_check(struct netlogon_creds_CredentialState *creds,
const struct netr_Credential *received_credentials);
struct netlogon_creds_CredentialState *netlogon_creds_copy(