Better explanation message for dmalloc.
authorMartin Pool <mbp@samba.org>
Wed, 9 Jan 2002 07:52:51 +0000 (07:52 +0000)
committerMartin Pool <mbp@samba.org>
Wed, 9 Jan 2002 07:52:51 +0000 (07:52 +0000)
Also more insertion of parenthesis to handle struct members called
'free'.

You can now get useful dmalloc output, as long as it is compatible
with your C library.  On RH7.1 it looks like you have to rebuild
dmalloc to allow free(0) by default, because something in libcrypt
does that. (sigh)
(This used to be commit 391cbb690196537c8b6292b42c2e27408cc7e249)

source3/auth/auth_compat.c
source3/configure
source3/configure.in
source3/rpc_server/srv_netlog_nt.c
source3/rpc_server/srv_pipe.c
source3/smbd/negprot.c
source3/smbd/server.c
source3/smbd/sesssetup.c

index 4039f0cc1e45d8d3fb339fe2aec277433f973922..28a9780d3f9b658d216be85539b9b05eed430228 100644 (file)
@@ -68,7 +68,7 @@ static NTSTATUS pass_check_smb(char *smb_name,
                nt_status = plaintext_auth_context->check_ntlm_password(plaintext_auth_context, 
                                                                        user_info, &server_info); 
                
-               plaintext_auth_context->free(&plaintext_auth_context);
+               (plaintext_auth_context->free)(&plaintext_auth_context);
        }               
        free_user_info(&user_info);
        free_server_info(&server_info);
index afd27c872b41c4f11dc38da35e1239d81f52398c..37253616702d792aa27dc0ada578ce87a513d54c 100755 (executable)
@@ -13855,6 +13855,6 @@ test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 # Print very concise instructions on building/use
 if test "x$enable_dmalloc" = xyes
 then
-       echo "$ac_t""Note: The dmalloc debug library will be included." 1>&6
-       echo "$ac_t""      Use the \"dmalloc\" command to turn it on." 1>&6
+       echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
+       echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
 fi
index a70f35ae0dafb3611fb38b35de6f07bcf9d7caa8..e65654f3b62a7f105d0eec8e64815b7192ceec6e 100644 (file)
@@ -2617,6 +2617,6 @@ AC_OUTPUT(include/stamp-h Makefile)
 # Print very concise instructions on building/use
 if test "x$enable_dmalloc" = xyes
 then
-       AC_MSG_RESULT([Note: The dmalloc debug library will be included.])
-       AC_MSG_RESULT([      Use the \"dmalloc\" command to turn it on.])
+       AC_MSG_RESULT([Note: The dmalloc debug library will be included.  To turn it on use])
+       AC_MSG_RESULT([      \$ eval \`dmalloc samba\`.])
 fi
\ No newline at end of file
index fbab46022cad79121b37e28c95a2d5034c4bb5de..a07ebc9a3fc3ceb66c028c1d518c62390c194b76 100644 (file)
@@ -585,7 +585,7 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
                } else {
                        status = auth_context->check_ntlm_password(auth_context, user_info, &server_info);
                }
-               auth_context->free(&auth_context);
+               (auth_context->free)(&auth_context);
                        
                break;
        }
@@ -614,7 +614,7 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
                        status = auth_context->check_ntlm_password(auth_context, user_info, &server_info);
                }
 
-               auth_context->free(&auth_context);
+               (auth_context->free)(&auth_context);
 
                break;
        }
index 36ca7e0686d480f6a21ffe2e22d88542ebb4134f..a38b86f826e3322ae8d8489f9478fe7a5888ea73 100644 (file)
@@ -357,7 +357,7 @@ static BOOL api_pipe_ntlmssp_verify(pipes_struct *p, RPC_AUTH_NTLMSSP_RESP *ntlm
        
        nt_status = auth_context->check_ntlm_password(auth_context, user_info, &server_info); 
        
-       auth_context->free(&auth_context);
+       (auth_context->free)(&auth_context);
        free_user_info(&user_info);
        
        p->ntlmssp_auth_validated = NT_STATUS_IS_OK(nt_status);
index 52ba5e97892e35a46079a719e84eeecf288f4360..af2f91936e1a27d1c2d3cf33f7bf8c4eb5e523a0 100644 (file)
@@ -37,7 +37,7 @@ static void get_challange(char buff[8])
        /* We might be called more than once, muliple negprots are premitted */
        if (negprot_global_auth_context) {
                DEBUG(3, ("get challange: is this a secondary negprot?  negprot_global_auth_context is non-NULL!\n"));
-               negprot_global_auth_context->free(&negprot_global_auth_context);
+               (negprot_global_auth_context->free)(&negprot_global_auth_context);
        }
 
        DEBUG(10, ("get challange: creating negprot_global_auth_context\n"));
index a8c1bc5c15ea57ac44ab5931e337a47bd2b38be3..b523659dbf5ec56160b2540d282810e5646ab589 100644 (file)
@@ -486,7 +486,7 @@ void exit_server(char *reason)
        DEBUG(2,("Closing connections\n"));
 
        if (negprot_global_auth_context) {
-               negprot_global_auth_context->free(&negprot_global_auth_context);
+               (negprot_global_auth_context->free)(&negprot_global_auth_context);
        }
 
        conn_close_all();
index a15911131906c34c072f391f32384c5cee56bd8c..f809f9ca0c373484979eb664b90104c3bb105794 100644 (file)
@@ -87,12 +87,12 @@ static NTSTATUS check_guest_password(auth_serversupplied_info **server_info)
        }
 
        if (!make_user_info_guest(&user_info)) {
-               auth_context->free(&auth_context);
+               (auth_context->free)(&auth_context);
                return NT_STATUS_NO_MEMORY;
        }
        
        nt_status = auth_context->check_ntlm_password(auth_context, user_info, server_info);
-       auth_context->free(&auth_context);
+       (auth_context->free)(&auth_context);
        free_user_info(&user_info);
        return nt_status;
 }
@@ -289,7 +289,7 @@ static int reply_spnego_negotiate(connection_struct *conn,
        DEBUG(3,("Got neg_flags=%08x\n", neg_flags));
 
        if (ntlmssp_auth_context) {
-               ntlmssp_auth_context->free(&ntlmssp_auth_context);
+               (ntlmssp_auth_context->free)(&ntlmssp_auth_context);
        }
 
        if (!NT_STATUS_IS_OK(nt_status = make_auth_context_subsystem(&ntlmssp_auth_context))) {
@@ -400,7 +400,7 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf,
        SAFE_FREE(workgroup);
        SAFE_FREE(machine);
                        
-       ntlmssp_auth_context->free(&ntlmssp_auth_context);
+       (ntlmssp_auth_context->free)(&ntlmssp_auth_context);
 
        free_user_info(&user_info);
        
@@ -741,7 +741,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
                                                                                        user_info, 
                                                                                        &server_info); 
                                
-                               plaintext_auth_context->free(&plaintext_auth_context);
+                               (plaintext_auth_context->free)(&plaintext_auth_context);
                        }
                }
        }