bind/bind-9.5-gssapictx-free.patch
Adam Tkac fb5bf17ee8 - added new initscript option KEYTAB_FILE which specified where is located
kerberos .keytab file for named service
- obsolete temporary bind-9.5-spnego-memory_management.patch by
    bind-9.5-gssapictx-free.patch which conforms BIND coding standards
    (#251853)
2007-08-23 09:09:35 +00:00

42 lines
1.5 KiB
Diff

Written-by: Adam Tkac <atkac redhat com>
diff -up bind-9.5.0a6/lib/dns/spnego.h.free bind-9.5.0a6/lib/dns/spnego.h
--- bind-9.5.0a6/lib/dns/spnego.h.free 2007-06-20 01:47:16.000000000 +0200
+++ bind-9.5.0a6/lib/dns/spnego.h 2007-08-22 14:32:13.000000000 +0200
@@ -67,5 +67,9 @@ OM_uint32 gss_accept_sec_context_spnego(
OM_uint32 *,
gss_cred_id_t *);
+/*
+ * We have to export this because we need to free memory allocated by spnego_malloc
+ */
+void spnego_free(void *ptr, const char *file, int line);
#endif
diff -up bind-9.5.0a6/lib/dns/gssapictx.c.free bind-9.5.0a6/lib/dns/gssapictx.c
--- bind-9.5.0a6/lib/dns/gssapictx.c.free 2007-06-20 01:47:16.000000000 +0200
+++ bind-9.5.0a6/lib/dns/gssapictx.c 2007-08-22 14:44:46.000000000 +0200
@@ -510,7 +510,11 @@ dst_gssapi_initctx(dns_name_t *name, isc
RETERR(isc_buffer_copyregion(outtoken, &r));
(void)gss_release_name(&minor, &gname);
+#ifdef USE_ISC_SPNEGO
+ spnego_free (gouttoken.value, __FILE__, __LINE__);
+#else
(void)gss_release_buffer(&minor, &gouttoken);
+#endif
if (gret == GSS_S_COMPLETE)
result = ISC_R_SUCCESS;
diff -up bind-9.5.0a6/lib/dns/spnego.c.free bind-9.5.0a6/lib/dns/spnego.c
--- bind-9.5.0a6/lib/dns/spnego.c.free 2007-06-20 01:47:16.000000000 +0200
+++ bind-9.5.0a6/lib/dns/spnego.c 2007-08-22 14:32:13.000000000 +0200
@@ -201,7 +201,7 @@ spnego_malloc(size_t size, const char *f
return (p);
}
-static void
+void
spnego_free(void *ptr, const char *file, int line)
{
char *p = ptr;