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 | 16097f2072085432f4c669d9e008023f36f7afbb (patch) | |
tree | ebbd2a28a21d3514afea0fffe1836b821d047d9f /source/smbd | |
parent | 71333299a6e6bc6d74d2172f71e3fe21ef75aa3c (diff) | |
download | samba-16097f2072085432f4c669d9e008023f36f7afbb.tar.gz samba-16097f2072085432f4c669d9e008023f36f7afbb.tar.xz samba-16097f2072085432f4c669d9e008023f36f7afbb.zip |
Added "passwd chat timeout" parameter. Docs to follow.
Jeremy.
Diffstat (limited to 'source/smbd')
-rw-r--r-- | source/smbd/chgpasswd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c index d99570ff7c0..5caf78e41a6 100644 --- a/source/smbd/chgpasswd.c +++ b/source/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; + } } } |