summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/auth/gensec/schannel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/auth/gensec/schannel.c b/source4/auth/gensec/schannel.c
index 2465e53bff..e7c545fb66 100644
--- a/source4/auth/gensec/schannel.c
+++ b/source4/auth/gensec/schannel.c
@@ -77,7 +77,12 @@ static NTSTATUS schannel_update(struct gensec_security *gensec_security, TALLOC_
if (state->creds == NULL) {
return NT_STATUS_INVALID_PARAMETER_MIX;
}
- state->creds = netlogon_creds_copy(state, state->creds);
+ /*
+ * We need to create a reference here or we don't get
+ * updates performed on the credentials if we create a
+ * copy.
+ */
+ state->creds = talloc_reference(state, state->creds);
if (state->creds == NULL) {
return NT_STATUS_NO_MEMORY;
}