User Manager for Domains on Win9x

Jeremy Allison jeremy at valinux.com
Tue Mar 13 23:21:14 GMT 2001


On Tue, Mar 13, 2001 at 04:09:01PM -0700, Jim McDonough wrote:
> Ok, I've figured out the general problem on User Manager for Domains on
> Windows 9x (says "The R. P. C. failed").  Seems to be that while it uses
> MSRPCs to get the info, it doesn't properly respond to the 0x80000005
> warning.  It responds (and gets from an NT server) properly to an ERRDOS
> class 234 error...
> ***********
> What would be the right place to detect and decide what the client wants?

Great work ! How about this patch, which is how we do it
in other parts of Samba ? If it works for you let me
know and I'll commit it.

Thanks,

		Jeremy.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------
-------------- next part --------------
Index: smbd/ipc.c
===================================================================
RCS file: /data/cvs/samba/source/smbd/ipc.c,v
retrieving revision 1.167.4.2
diff -u -r1.167.4.2 ipc.c
--- smbd/ipc.c	2001/02/21 00:11:56	1.167.4.2
+++ smbd/ipc.c	2001/03/13 23:01:19
@@ -36,6 +36,7 @@
 #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 @@
 	if (buffer_too_large)
 	{
 		/* 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 | 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, FLAGS2_32_BIT_ERROR_CODES);
+			SIVAL(outbuf, smb_rcls, 0x80000000 | STATUS_BUFFER_OVERFLOW);
+		}
 	}
 
 	copy_trans_params_and_data(outbuf, align,


More information about the samba-technical mailing list