Blame SOURCES/mod_auth_kerb-5.4-longuser.patch

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