diff options
author | Jeremy Allison <jra@samba.org> | 2009-09-06 21:38:50 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-09-06 21:38:50 -0700 |
commit | 43c766a14a5eeed80e57bae9fde21eb2b542c209 (patch) | |
tree | b0330fce78ed8ec8fc30e039acf701787ebca90e /source3/smbd | |
parent | 5a22c0225abe2da11e844888475cbd9c40c6c47c (diff) | |
download | samba-43c766a14a5eeed80e57bae9fde21eb2b542c209.tar.gz samba-43c766a14a5eeed80e57bae9fde21eb2b542c209.tar.bz2 samba-43c766a14a5eeed80e57bae9fde21eb2b542c209.zip |
Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".
Revert change from 3.3 -> 3.4 with read_socket_with_timeout changed
from sys_read() to sys_recv(). read_socket_with_timeout() is called
with non-fd's (with a pty in chgpasswd.c and with a disk file in
lib/dbwrap_file.c via read_data()). recv works for the disk file,
but not the pty. Change the name of read_socket_with_timeout() to
read_fd_with_timeout() to make this clear (and add comments).
Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/chgpasswd.c | 2 | ||||
-rw-r--r-- | source3/smbd/process.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index 64f988f1f7..eaee3d8509 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -269,7 +269,7 @@ static int expect(int master, char *issue, char *expected) buffer[nread] = 0; while (True) { - status = read_socket_with_timeout( + status = read_fd_with_timeout( master, buffer + nread, 1, sizeof(buffer) - nread - 1, timeout, &len); diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 6ec46071ff..dd58ea88fa 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -128,7 +128,7 @@ static NTSTATUS read_packet_remainder(int fd, char *buffer, return NT_STATUS_OK; } - return read_socket_with_timeout(fd, buffer, len, len, timeout, NULL); + return read_fd_with_timeout(fd, buffer, len, len, timeout, NULL); } /**************************************************************************** @@ -162,7 +162,7 @@ static NTSTATUS receive_smb_raw_talloc_partial_read(TALLOC_CTX *mem_ctx, memcpy(writeX_header, lenbuf, 4); - status = read_socket_with_timeout( + status = read_fd_with_timeout( fd, writeX_header + 4, STANDARD_WRITE_AND_X_HEADER_SIZE, STANDARD_WRITE_AND_X_HEADER_SIZE, |