sbonazzo / rpms / cyrus-sasl

Forked from rpms/cyrus-sasl 2 years ago
Clone

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

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