Changing Domains from NT4 / AD 2000

Jeremy Allison jeremy at valinux.com
Wed Apr 11 20:40:12 GMT 2001


"MCCALL,DON (HP-USA,ex1)" wrote:
> 
> We (hp) have coded a fix for this for the 2.0.7 version we ship as part of
> the
> HP-UX 11.0 operating system.
> 
>  Jeremy, et all - could this still be an issue with
> the 2.2  code?  I can submit a patch for this as soon as I can find the lab
> guy
> who actually coded the fix, if you like.

Actually, I was the person who coded the fix for Agilent :-).
I don't know if the CIFS/9000 people got it from me :-).

I fixed it at the same time in the 2.2 code so it's not an
issue there.

I've attached the fix for 2.0.7 to this email.

Cheers,

	Jeremy.

Index: include/rpc_lsa.h
===================================================================
RCS file: /data/cvs/samba/source/include/rpc_lsa.h,v
retrieving revision 1.8.2.2
diff -u -r1.8.2.2 rpc_lsa.h
--- include/rpc_lsa.h	1999/04/06 00:39:45	1.8.2.2
+++ include/rpc_lsa.h	2001/04/11 22:37:01
@@ -52,7 +52,7 @@
 #define LSA_LOOKUPRIDS      0xFD
 
 #define LSA_MAX_GROUPS 96
-#define LSA_MAX_SIDS 32
+#define LSA_MAX_SIDS 128
 
 /* DOM_QUERY - info class 3 and 5 LSA Query response */
 typedef struct dom_query_info
Index: include/rpc_netlogon.h
===================================================================
RCS file: /data/cvs/samba/source/include/rpc_netlogon.h,v
retrieving revision 1.4.4.2
diff -u -r1.4.4.2 rpc_netlogon.h
--- include/rpc_netlogon.h	1999/04/20 01:01:43	1.4.4.2
+++ include/rpc_netlogon.h	2001/04/11 22:37:01
@@ -120,6 +120,10 @@
 	UNISTR2 uni_logon_dom; /* logon domain unicode string */
 
 	DOM_SID2 dom_sid;           /* domain SID */
+
+	uint32 num_other_groups;        /* other groups */
+	DOM_GID other_gids[LSA_MAX_GROUPS]; /* group info */
+
 	DOM_SID2 other_sids[LSA_MAX_SIDS]; /* undocumented - domain SIDs */
 
 } NET_USER_INFO_3;
Index: rpc_parse/parse_net.c
===================================================================
RCS file: /data/cvs/samba/source/rpc_parse/parse_net.c,v
retrieving revision 1.17.2.6
diff -u -r1.17.2.6 parse_net.c
--- rpc_parse/parse_net.c	1999/04/20 01:01:44	1.17.2.6
+++ rpc_parse/parse_net.c	2001/04/11 22:37:01
@@ -1080,6 +1080,8 @@
 	init_unistr2(&usr->uni_logon_dom, logon_dom, len_logon_dom);
 
 	init_dom_sid2(&usr->dom_sid, dom_sid);
+
+	usr->num_other_groups = num_other_sids;
 	/* "other" sids are set up above */
 }
 
@@ -1198,11 +1200,22 @@
 	if(!smb_io_dom_sid2("", &usr->dom_sid, ps, depth))           /* domain SID */
 		return False;
 
-	SMB_ASSERT_ARRAY(usr->other_sids, usr->num_other_sids);
+	if (usr->num_other_sids) {
+		SMB_ASSERT_ARRAY(usr->other_sids, usr->num_other_sids);
 
-	for (i = 0; i < usr->num_other_sids; i++) {
-		if(!smb_io_dom_sid2("", &usr->other_sids[i], ps, depth)) /* other domain SIDs */
+		if(!prs_uint32("num_other_groups", ps, depth, &usr->num_other_groups))
 			return False;
+
+		SMB_ASSERT_ARRAY(usr->other_gids, usr->num_other_groups);
+
+		for (i = 0; i < usr->num_other_groups; i++) {
+			if(!smb_io_gid("", &usr->other_gids[i], ps, depth)) /* other GIDs */
+				return False;
+		}
+		for (i = 0; i < usr->num_other_sids; i++) {
+			if(!smb_io_dom_sid2("", &usr->other_sids[i], ps, depth)) /* other domain SIDs */
+				return False;
+		}
 	}
 
 	return True;

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------




More information about the samba-technical mailing list