svn commit: samba r3921 - in branches/SAMBA_4_0/source/torture/rpc: .

abartlet at samba.org abartlet at samba.org
Tue Nov 23 11:02:27 GMT 2004


Author: abartlet
Date: 2004-11-23 11:02:27 +0000 (Tue, 23 Nov 2004)
New Revision: 3921

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3921

Log:
Cross-test SIDs in RPC-SAMSYNC, fix the build.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/torture/rpc/samsync.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/samsync.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/samsync.c	2004-11-23 08:57:42 UTC (rev 3920)
+++ branches/SAMBA_4_0/source/torture/rpc/samsync.c	2004-11-23 11:02:27 UTC (rev 3921)
@@ -238,6 +238,14 @@
 	} \
 } while (0)
 
+#define TEST_SID_EQUAL(s1, s2) do {\
+	if (!dom_sid_equal(s1, s2)) {\
+	      printf("dom_sid mismatch: " #s1 ":%s != " #s2 ": %s\n", \
+		     dom_sid_string(mem_ctx, s1), dom_sid_string(mem_ctx, s2));\
+	      ret = False;\
+	} \
+} while (0)
+
 /* The ~SEC_DESC_SACL_PRESENT is because we don't, as administrator,
  * get back the SACL part of the SD when we ask over SAMR */
 
@@ -782,8 +790,8 @@
 	struct lsa_OpenTrustedDomain t;
 	struct policy_handle trustdom_handle;
 	struct lsa_QueryTrustedDomainInfo q;
-	union lsa_TrustedDomainInfo *info[4];
-	int levels [] = {1, 3};
+	union lsa_TrustedDomainInfo *info[9];
+	int levels [] = {1, 3, 8};
 	int i;
 
 	new->name = talloc_reference(new, trusted_domain->domain_name.string);
@@ -812,8 +820,10 @@
 		info[levels[i]]  = q.out.info;
 	}
 
-	TEST_STRING_EQUAL(info[1]->info1.domain_name, trusted_domain->domain_name);
-	TEST_INT_EQUAL(info[3]->info3.flags, trusted_domain->flags);
+	TEST_SID_EQUAL(info[8]->full_info.info_ex.sid, dom_sid);
+	TEST_STRING_EQUAL(info[8]->full_info.info_ex.name, trusted_domain->domain_name);
+	TEST_STRING_EQUAL(info[1]->name.domain_name, trusted_domain->domain_name);
+	TEST_INT_EQUAL(info[3]->flags.flags, trusted_domain->flags);
 	TEST_SEC_DESC_EQUAL(trusted_domain->sdbuf, lsa, &trustdom_handle);
 
 	DLIST_ADD(samsync_state->trusted_domains, new);



More information about the samba-cvs mailing list