diff options
author | Matthew Chapman <matty@samba.org> | 1999-02-24 19:08:43 +0000 |
---|---|---|
committer | Matthew Chapman <matty@samba.org> | 1999-02-24 19:08:43 +0000 |
commit | 869f9860ebe86a864daacd40115d432e55eebd68 (patch) | |
tree | 56a7ca09ff82a6b75d398d52eff738f888a899c5 /source3/smbd | |
parent | 7f88bf771a5e9dd5d55a7047a208ebc01906d11a (diff) | |
download | samba-869f9860ebe86a864daacd40115d432e55eebd68.tar.gz samba-869f9860ebe86a864daacd40115d432e55eebd68.tar.bz2 samba-869f9860ebe86a864daacd40115d432e55eebd68.zip |
Return either STATUS_BUFFER_OVERFLOW or ERRDOS/ERRmoredata depending on
whether the client supports 32-bit error codes.
(This used to be commit cb5428308d6978f7bd76c1b878dd4a43135a274d)
Diffstat (limited to 'source3/smbd')
-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, |