From: Richard Sharpe Date: Mon, 22 Jul 2013 23:04:43 +0000 (-0700) Subject: There are tests all over the SMB1 code to check that srv_send_smb fails, but it never... X-Git-Tag: samba-4.0.23~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e158ed9d56c1d125deab00b46f325c5147045801;p=thirdparty%2Fsamba.git There are tests all over the SMB1 code to check that srv_send_smb fails, but it never returns false. Even if the write to the socket/fd fails, we never return false and will keep reading stuff off of the input buffer until it is exhausted and then we will exit. Signed-off-by: Richard Sharpe Reviewed-by: Jeremy Allison Autobuild-User(master): Richard Sharpe Autobuild-Date(master): Sat Aug 3 17:41:22 CEST 2013 on sn-devel-104 (cherry picked from commit 852c9ac34dbef66d0b2619554c611157c2fab771) Bug: https://bugzilla.samba.org/show_bug.cgi?id=10880 S3: source3/smbd/process.c::srv_send_smb() returns true on the error path. --- diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 942ede0c814..e67c56cf60d 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -202,7 +202,7 @@ out: SMB_PERFCOUNT_END(pcd); smbd_unlock_socket(sconn); - return true; + return (ret > 0); } /*******************************************************************