s3:libads: let ads_sasl_spnego_bind() reset krb5_state at the end
authorStefan Metzmacher <metze@samba.org>
Wed, 27 Apr 2022 11:39:11 +0000 (13:39 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 14 May 2024 10:18:31 +0000 (10:18 +0000)
In future we'll pass in creds from the caller, so we better
restore the original krb5_state at the end of ads_sasl_spnego_bind().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libads/sasl.c

index 1b4e8471477ecf565f04a765df5444ae037d0ce5..989f970598d31db91271e0fdd31cee40a88d1691 100644 (file)
@@ -751,6 +751,7 @@ done:
                          ads_errstr(status)));
        }
        ads_free_service_principal(&p);
+       cli_credentials_set_kerberos_state(creds, krb5_state, CRED_SPECIFIED);
        TALLOC_FREE(frame);
        return status;
 }