diff options
Diffstat (limited to 'source3/smbd/ipc.c')
-rw-r--r-- | source3/smbd/ipc.c | 17 |
1 files changed, 10 insertions, 7 deletions
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, |