Patch for mod_ntlm_winbind for x86_64 apache 2.0

James Tuley jbtule at mac.com
Thu Jun 1 21:26:19 GMT 2006


I'm not sure who or where to report this bug patch to, so I'm just emailing it here for anyone to do with it whatever.

This patch fixes a bug with mod_ntlm_winbind when compiled for x86_64 with apache 2.0 in which once setup, you get and unfunctional apache with no errors printed to the error_log

All the patch contains are a couple of unsigned ints changed the apr's expected type def.

-Jay Tuley

Index: mod_ntlm_winbind.c
===================================================================
--- mod_ntlm_winbind.c  (revision 549)
+++ mod_ntlm_winbind.c  (working copy)
@@ -542,7 +542,7 @@
     char *newline;
     char args_to_helper[HUGE_STRING_LEN];
     char args_from_helper[HUGE_STRING_LEN];
-    unsigned int bytes_written;
+    apr_size_t bytes_written;
     int bytes_read;
 
     if (( global_ntlm_context.ntlm_plaintext_helper = get_auth_helper( r, global_ntlm_context.ntlm_plaintext_helper, crec->ntlm_plaintext_helper, CLEANUP(cleanup_ntlm_plaintext_helper))) == NULL ) {
@@ -586,7 +586,7 @@
 #endif
 
     if ( bytes_written < strlen( args_to_helper )) {
-        RDEBUG( "failed to write user/pass to helper - wrote %d bytes", bytes_written );
+        RDEBUG( "failed to write user/pass to helper - wrote %" APR_SIZE_T_FMT " bytes", bytes_written );
         apr_pool_destroy( global_ntlm_context.ntlm_plaintext_helper->pool );
         apr_pool_destroy( ctxt->connected_user_authenticated->pool );
         return HTTP_INTERNAL_SERVER_ERROR;
@@ -671,7 +671,7 @@
     char args_to_helper[HUGE_STRING_LEN];
     char args_from_helper[HUGE_STRING_LEN];
     ntlm_connection_context_t *ctxt = get_connection_context( r->connection );
-    unsigned int bytes_written;
+    apr_size_t bytes_written;
     int bytes_read;
     struct _ntlm_auth_helper *auth_helper;
 
@@ -737,7 +737,7 @@
     bytes_written = ap_bwrite(auth_helper->out_to_helper, args_to_helper, strlen(args_to_helper));
 #endif
     if (bytes_written < strlen(args_to_helper)) {
-        RDEBUG("failed to write NTLMSSP string to helper - wrote %d bytes", bytes_written);
+        RDEBUG("failed to write NTLMSSP string to helper - wrote %" APR_SIZE_T_FMT " bytes", bytes_written);
         apr_pool_destroy(auth_helper->pool);
         apr_pool_destroy(ctxt->connected_user_authenticated->pool);




More information about the samba-technical mailing list