From 6babe8da07b6a803d15deed70dd7e6aaae93ed4a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 20 Apr 1998 23:07:28 +0000 Subject: Added 'passwd chat debug' parameter to allow admins to debug their Samba passwd chat scripts. Jeremy. (This used to be commit 5a995f4f75ffb0d55d6ceaa63a1209d230001991) --- source3/smbd/chgpasswd.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source3/smbd/chgpasswd.c') diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index 7494d0162d..92bdb1adf0 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -264,9 +264,8 @@ static int talktochild(int master, char *chatsequence) if (!strequal(chatbuf,".")) ok = expect(master,chatbuf,buf); -#if DEBUG_PASSWORD - DEBUG(100,("chatbuf=[%s] responsebuf=[%s]\n",chatbuf,buf)); -#endif + if(lp_passwd_chat_debug()) + DEBUG(100,("talktochild: chatbuf=[%s] responsebuf=[%s]\n",chatbuf,buf)); if (!ok) { DEBUG(3,("response %d incorrect\n",count)); @@ -278,9 +277,8 @@ static int talktochild(int master, char *chatsequence) if (!strequal(chatbuf,".")) writestring(master,chatbuf); -#if DEBUG_PASSWORD - DEBUG(100,("sendbuf=[%s]\n",chatbuf)); -#endif + if(lp_passwd_chat_debug()) + DEBUG(100,("talktochild: sendbuf=[%s]\n",chatbuf)); } if (count<1) return(False); -- cgit