mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
Added 'passwd chat debug' parameter to allow admins to debug their
Samba passwd chat scripts.
Jeremy.
(This used to be commit 5a995f4f75
)
This commit is contained in:
parent
efb71742ca
commit
6babe8da07
@ -937,6 +937,7 @@ BOOL lp_time_server(void);
|
||||
BOOL lp_bind_interfaces_only(void);
|
||||
BOOL lp_net_wksta_user_logon(void);
|
||||
BOOL lp_unix_password_sync(void);
|
||||
BOOL lp_passwd_chat_debug(void);
|
||||
int lp_os_level(void);
|
||||
int lp_max_ttl(void);
|
||||
int lp_max_wins_ttl(void);
|
||||
|
@ -192,6 +192,7 @@ typedef struct
|
||||
BOOL bBindInterfacesOnly;
|
||||
BOOL bNetWkstaUserLogon;
|
||||
BOOL bUnixPasswdSync;
|
||||
BOOL bPasswdChatDebug;
|
||||
} global;
|
||||
|
||||
static global Globals;
|
||||
@ -444,6 +445,7 @@ static struct parm_struct parm_table[] =
|
||||
{"root", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0},
|
||||
{"passwd program", P_STRING, P_GLOBAL, &Globals.szPasswdProgram, NULL, NULL, 0},
|
||||
{"passwd chat", P_STRING, P_GLOBAL, &Globals.szPasswdChat, NULL, NULL, 0},
|
||||
{"passwd chat debug",P_BOOL, P_GLOBAL, &Globals.bPasswdChatDebug, NULL, NULL, 0},
|
||||
{"username map", P_STRING, P_GLOBAL, &Globals.szUsernameMap, NULL, NULL, 0},
|
||||
{"password level", P_INTEGER, P_GLOBAL, &Globals.pwordlevel, NULL, NULL, 0},
|
||||
{"username level", P_INTEGER, P_GLOBAL, &Globals.unamelevel, NULL, NULL, 0},
|
||||
@ -751,6 +753,7 @@ static void init_globals(void)
|
||||
Globals.bBindInterfacesOnly = False;
|
||||
Globals.bNetWkstaUserLogon = True;
|
||||
Globals.bUnixPasswdSync = False;
|
||||
Globals.bPasswdChatDebug = False;
|
||||
|
||||
/* these parameters are set to defaults that are more appropriate
|
||||
for the increasing samba install base:
|
||||
@ -981,6 +984,7 @@ FN_GLOBAL_BOOL(lp_time_server,&Globals.bTimeServer)
|
||||
FN_GLOBAL_BOOL(lp_bind_interfaces_only,&Globals.bBindInterfacesOnly)
|
||||
FN_GLOBAL_BOOL(lp_net_wksta_user_logon,&Globals.bNetWkstaUserLogon)
|
||||
FN_GLOBAL_BOOL(lp_unix_password_sync,&Globals.bUnixPasswdSync)
|
||||
FN_GLOBAL_BOOL(lp_passwd_chat_debug,&Globals.bPasswdChatDebug)
|
||||
|
||||
FN_GLOBAL_INTEGER(lp_os_level,&Globals.os_level)
|
||||
FN_GLOBAL_INTEGER(lp_max_ttl,&Globals.max_ttl)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user