[squid-dev] [PATCH] remove error_message fromkerberos_ldap_group

Markus Moeller huaraz at moeller.plus.com
Tue Feb 17 22:35:14 UTC 2015


Hi Amos,

Apologies this based on an observation that if KRB5 checks are fine but 
GSSAPI not the PAC section would be compiled but the main part of the helper 
not which did not make sense.

in helpers/negotiate_auth/kerberos/negotiate_kerberos_pac.cc
* whats this?

I hope I addressed the rest in the attached.

Markus

"Amos Jeffries"  wrote in message news:54E28FBB.9090503 at treenet.co.nz...

On 17/02/2015 11:57 a.m., Markus Moeller wrote:
>
> Hi Amos,
>
>    Please find attached a patch to replace error_message with
> krb5_get_error_message.
>


in .../ext_kerberos_ldap_group_acl.8:

* just a note that the - characters need to be \-escaped. Ican do a
followup docs patch on this since all the other options need it as well.


in .../kerberos_ldap_group/support_krb5.cc

* missing whitespace empty line after k5_error2()

* please deduplicate shared code betweenk5_error2() and k5_error() and
make them static:

+static void
+k5_error(const char* msg, krb5_error_code code)
+{
+    k5_error(msg, "", code);
+}
+
+static void
+k5_error2(const char* msg, char* msg2, krb5_error_code code)
+{
+    const char *errmsg;
+    errmsg = krb5_get_error_message(kparam.context, code);
+    error((char *) "%s| %s: ERROR: %s%s : %s\n", LogTime(), PROGRAM,
msg, msg2, errmsg);
+#if HAVE_KRB5_FREE_ERROR_MESSAGE
+    krb5_free_error_message(kparam.context, errmsg);
+#elif HAVE_KRB5_FREE_ERROR_STRING
+    krb5_free_error_string(kparam.context, (char *)errmsg);
+#else
+    xfree(errmsg);
+#endif
+}

... and the code calling k5_error2() place the trailing SP character
inside their msg1 parameter string.


in helpers/negotiate_auth/kerberos/negotiate_kerberos_pac.cc
* whats this?


Amos

_______________________________________________
squid-dev mailing list
squid-dev at lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: krb5_error_message_2.patch
Type: application/octet-stream
Size: 24147 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150217/8b23430b/attachment-0001.obj>


More information about the squid-dev mailing list