sbonazzo / rpms / cyrus-sasl

Forked from rpms/cyrus-sasl 2 years ago
Clone

Blame SOURCES/cyrus-sasl-2.1.26-release-server_creds.patch

6611fc
diff -up cyrus-sasl-2.1.26/plugins/gssapi.c.release-server_creds cyrus-sasl-2.1.26/plugins/gssapi.c
6611fc
--- cyrus-sasl-2.1.26/plugins/gssapi.c.release-server_creds	2012-12-20 17:17:37.000000000 +0100
6611fc
+++ cyrus-sasl-2.1.26/plugins/gssapi.c	2012-12-20 17:42:11.498138999 +0100
6611fc
@@ -945,6 +945,12 @@ gssapi_server_mech_authneg(context_t *te
6611fc
 	ret = SASL_CONTINUE;
6611fc
     }
6611fc
 
6611fc
+    /* Release server creds which are no longer needed */
6611fc
+     if ( text->server_creds != GSS_C_NO_CREDENTIAL) {
6611fc
+        maj_stat = gss_release_cred(&min_stat, &text->server_creds);
6611fc
+        text->server_creds = GSS_C_NO_CREDENTIAL;
6611fc
+     }
6611fc
+
6611fc
   cleanup:
6611fc
     if (client_name_MN) {
6611fc
 	GSS_LOCK_MUTEX(params->utils);