From c4b4386996c0f759017c74d928b37f62d1f710f4 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 9 Jan 2003 06:58:07 +0000 Subject: Remove read_with_timeout() and replaced its only caller (the passwd chat stuff) with a call to read_socket_with_timeout() which does the same thing. Passwd chat still works but I couldn't figure out the right arguments to passwd chat to get it to work right but data was definitely getting through. (This used to be commit 88eb9e9486bca55a38e40ae53aed35ee338a68d7) --- source3/smbd/chgpasswd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index cc130d16c2..fb06ad3ab8 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -249,9 +249,9 @@ static int expect(int master, char *issue, char *expected) nread = 0; buffer[nread] = 0; - while ((len = read_with_timeout(master, buffer + nread, 1, - sizeof(buffer) - nread - 1, - timeout)) > 0) { + while ((len = read_socket_with_timeout(master, buffer + nread, 1, + sizeof(buffer) - nread - 1, + timeout)) > 0) { nread += len; buffer[nread] = 0; @@ -863,6 +863,10 @@ static NTSTATUS check_oem_password(const char *user, */ new_pw_len = IVAL(lmdata, 512); + + DEBUG(0, ("** new_pw_len = %d, new_passwd_size = %d\n", + new_pw_len, new_passwd_size)); + if (new_pw_len < 0 || new_pw_len > new_passwd_size - 1) { DEBUG(0,("check_oem_password: incorrect password length (%d).\n", new_pw_len)); pdb_free_sam(&sampass); -- cgit