From 869f9860ebe86a864daacd40115d432e55eebd68 Mon Sep 17 00:00:00 2001 From: Matthew Chapman Date: Wed, 24 Feb 1999 19:08:43 +0000 Subject: Return either STATUS_BUFFER_OVERFLOW or ERRDOS/ERRmoredata depending on whether the client supports 32-bit error codes. (This used to be commit cb5428308d6978f7bd76c1b878dd4a43135a274d) --- source3/smbd/ipc.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'source3') diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index c8c3b52194..a4d452b2a8 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -61,6 +61,7 @@ extern fstring global_myworkgroup; extern int Client; extern int smb_read_error; +extern uint32 global_client_caps; static BOOL api_Unsupported(connection_struct *conn,uint16 vuid, char *param,char *data, int mdrcnt,int mprcnt, @@ -187,13 +188,15 @@ static void send_trans_reply(char *outbuf, if (buffer_too_large) { -#if 0 - /* issue a buffer size warning. on a DCE/RPC pipe, expect an SMBreadX... */ - SIVAL(outbuf, smb_flg2, FLAGS2_32_BIT_ERROR_CODES); - SIVAL(outbuf, smb_rcls, 0x80000000 | NT_STATUS_ACCESS_VIOLATION); -#endif - SCVAL(outbuf, smb_rcls, ERRDOS); - SSVAL(outbuf, smb_err, ERRmoredata); + if (global_client_caps & CAP_STATUS32) + { + /* issue a buffer size warning. on a DCE/RPC pipe, expect an SMBreadX... */ + SIVAL(outbuf, smb_flg2, FLAGS2_32_BIT_ERROR_CODES); + SIVAL(outbuf, smb_rcls, 0x80000005); /* STATUS_BUFFER_OVERFLOW */ + } else { + SCVAL(outbuf, smb_rcls, ERRDOS); + SSVAL(outbuf, smb_err, ERRmoredata); + } } copy_trans_params_and_data(outbuf, align, -- cgit