Fix from Jim McDonough of IBM for using Win9x user manager.
authorJeremy Allison <jra@samba.org>
Tue, 13 Mar 2001 23:16:39 +0000 (23:16 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 13 Mar 2001 23:16:39 +0000 (23:16 +0000)
Jeremy.

source/smbd/ipc.c

index 3cc9aca99e2f73828ec662f0d5295a9c5f6194d9..1418d3444faa9c63a4cba05693995e78b87d757e 100644 (file)
@@ -36,6 +36,7 @@ extern fstring local_machine;
 #define NERR_notsupported 50
 
 extern int smb_read_error;
+extern uint32 global_client_caps;
 
 /*******************************************************************
  copies parameters and data, as needed, into the smb buffer
@@ -102,8 +103,14 @@ void send_trans_reply(char *outbuf,
        if (buffer_too_large)
        {
                /* issue a buffer size warning.  on a DCE/RPC pipe, expect an SMBreadX... */
-               SIVAL(outbuf, smb_flg2, SVAL(outbuf, smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
-               SIVAL(outbuf, smb_rcls, 0x80000000 | STATUS_BUFFER_OVERFLOW);
+               if (!(global_client_caps & (CAP_NT_SMBS | CAP_STATUS32 ))) { 
+                       /* Win9x version. */
+                       SSVAL(outbuf, smb_err, ERRmoredata);
+                       SCVAL(outbuf, smb_rcls, ERRDOS);
+               } else {
+                       SIVAL(outbuf, smb_flg2, SVAL(outbuf, smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
+                       SIVAL(outbuf, smb_rcls, 0x80000000 | STATUS_BUFFER_OVERFLOW);
+               }
        }
 
        copy_trans_params_and_data(outbuf, align,