Blame SOURCES/mod_auth_kerb-5.4-longuser.patch

b2b3b1
b2b3b1
https://bugzilla.redhat.com/show_bug.cgi?id=867153
b2b3b1
b2b3b1
Patch by: jkaluza
b2b3b1
b2b3b1
--- mod_auth_kerb-5.4/src/mod_auth_kerb.c.longuser
b2b3b1
+++ mod_auth_kerb-5.4/src/mod_auth_kerb.c
b2b3b1
@@ -80,6 +80,7 @@
b2b3b1
 
b2b3b1
 #define MECH_NEGOTIATE "Negotiate"
b2b3b1
 #define SERVICE_NAME "HTTP"
b2b3b1
+#define MAX_LOCAL_USERNAME 255
b2b3b1
 
b2b3b1
 #include <httpd.h>
b2b3b1
 #include <http_config.h>
b2b3b1
@@ -1815,13 +1816,13 @@ do_krb5_an_to_ln(request_rec *r) {
b2b3b1
 		    krb5_get_err_text(kcontext, code));
b2b3b1
 	   goto end;
b2b3b1
   }
b2b3b1
-  MK_USER_LNAME = apr_pcalloc(r->pool, strlen(MK_USER)+1);
b2b3b1
+  MK_USER_LNAME = apr_pcalloc(r->pool, MAX_LOCAL_USERNAME+1);
b2b3b1
   if (MK_USER_LNAME == NULL) {
b2b3b1
      log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
b2b3b1
 	   	"ap_pcalloc() failed (not enough memory)");
b2b3b1
      goto end;
b2b3b1
   }
b2b3b1
-    code = krb5_aname_to_localname(kcontext, client, strlen(MK_USER), MK_USER_LNAME);
b2b3b1
+    code = krb5_aname_to_localname(kcontext, client, MAX_LOCAL_USERNAME, MK_USER_LNAME);
b2b3b1
     if (code) {
b2b3b1
 		  if (code != KRB5_LNAME_NOTRANS) {
b2b3b1
       			log_rerror(APLOG_MARK, APLOG_ERR, 0, r,