1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

Return either STATUS_BUFFER_OVERFLOW or ERRDOS/ERRmoredata depending on

whether the client supports 32-bit error codes.
This commit is contained in:
Matthew Chapman -
parent d1cc33bcb6
commit cb5428308d

View File

@ -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,