diff options
author | Jeremy Allison <jra@samba.org> | 2003-11-24 20:18:47 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-11-24 20:18:47 +0000 |
commit | 73034f91166ca6ebb1bf11532eb2a99b95967636 (patch) | |
tree | a223ed76e73de0deeb6bb3d6e7101db04cffecdb /source3/smbd/chgpasswd.c | |
parent | c26aa9fd2dab2b5a3d06da0170bda86eae48226b (diff) | |
download | samba-73034f91166ca6ebb1bf11532eb2a99b95967636.tar.gz samba-73034f91166ca6ebb1bf11532eb2a99b95967636.tar.xz samba-73034f91166ca6ebb1bf11532eb2a99b95967636.zip |
Added "passwd chat timeout" parameter. Docs to follow.
Jeremy.
(This used to be commit 16097f2072085432f4c669d9e008023f36f7afbb)
Diffstat (limited to 'source3/smbd/chgpasswd.c')
-rw-r--r-- | source3/smbd/chgpasswd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index d99570ff7c0..5caf78e41a6 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -245,7 +245,8 @@ static int expect(int master, char *issue, char *expected) if (strequal(expected, ".")) return True; - timeout = 2000; + /* Initial timeout. */ + timeout = lp_passwd_chat_timeout() * 1000; nread = 0; buffer[nread] = 0; @@ -261,8 +262,10 @@ static int expect(int master, char *issue, char *expected) pstrcpy( str, buffer); trim_char( str, ' ', ' '); - if ((match = (unix_wild_match(expected, str) == 0))) - timeout = 200; + if ((match = (unix_wild_match(expected, str) == 0))) { + /* Now data has started to return, lower timeout. */ + timeout = lp_passwd_chat_timeout() * 100; + } } } |