There are tests all over the SMB1 code to check that srv_send_smb fails, but it never...
authorRichard Sharpe <realrichardsharpe@gmail.com>
Mon, 22 Jul 2013 23:04:43 +0000 (16:04 -0700)
committerKarolin Seeger <kseeger@samba.org>
Wed, 29 Oct 2014 20:16:07 +0000 (21:16 +0100)
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 <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
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.

source3/smbd/process.c

index 942ede0c8145bbccf3ed3fd33790181e59763ae0..e67c56cf60d9c15bbc69a88613df7ebc930a5b01 100644 (file)
@@ -202,7 +202,7 @@ out:
        SMB_PERFCOUNT_END(pcd);
 
        smbd_unlock_socket(sconn);
-       return true;
+       return (ret > 0);
 }
 
 /*******************************************************************