[SCM] Samba Shared Repository - branch master updated

Kamen Mazdrashki kamenim at samba.org
Fri Oct 29 03:55:02 MDT 2010


The branch, master has been updated
       via  c5c6935 s4-drs_tests: drs_util_DsAttributeId_to_string() is not used anymore
       via  07240e9 s4-resolve_oids: Remove redundant check - resolve_oids_need_value() handle this
       via  6b188fb s4-schema_init: we should be able to resolve Syntax OIDs with prefixMap we have
       via  72189ae s4-pfm_test: Use single instance of global testing data to test with
       via  fbc3fc2 s4-pfm-test: Enrich and fix comment primary for testing data
      from  4a11cad build: add the -fno-common flags to fix the link pb on mac os X

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c5c69359d9d18c9b9be29b0442567cf19f7810a0
Author: Kamen Mazdrashki <kamenim at samba.org>
Date:   Fri Oct 29 01:54:51 2010 +0300

    s4-drs_tests: drs_util_DsAttributeId_to_string() is not used anymore
    
    Autobuild-User: Kamen Mazdrashki <kamenim at samba.org>
    Autobuild-Date: Fri Oct 29 09:54:01 UTC 2010 on sn-devel-104

commit 07240e97f859e2b46c1fc19c2fa7f5254ee05ccb
Author: Kamen Mazdrashki <kamenim at samba.org>
Date:   Fri Oct 29 01:18:31 2010 +0300

    s4-resolve_oids: Remove redundant check - resolve_oids_need_value() handle this

commit 6b188fbad47f04f3a9b8979a04a0f70d10b4ada9
Author: Kamen Mazdrashki <kamenim at samba.org>
Date:   Wed Oct 27 22:29:40 2010 +0300

    s4-schema_init: we should be able to resolve Syntax OIDs with prefixMap we have
    
    If Syntax OID is not in the prefixMap then we are getting
    an unknown Attribute Syntax (which we can't handle anyway)

commit 72189aef8d4c898b0537e1fb5a1493454feaef57
Author: Kamen Mazdrashki <kamenim at samba.org>
Date:   Wed Oct 27 22:21:50 2010 +0300

    s4-pfm_test: Use single instance of global testing data to test with

commit fbc3fc2e5f2910aa2ce324de541ca98d72b6f702
Author: Kamen Mazdrashki <kamenim at samba.org>
Date:   Wed Oct 27 22:12:11 2010 +0300

    s4-pfm-test: Enrich and fix comment primary for testing data

-----------------------------------------------------------------------

Summary of changes:
 source4/dsdb/samdb/ldb_modules/resolve_oids.c |    4 -
 source4/dsdb/schema/schema_init.c             |    6 +-
 source4/torture/drs/drs_util.c                |   74 --------------------
 source4/torture/drs/unit/prefixmap_tests.c    |   93 ++++++++++---------------
 4 files changed, 39 insertions(+), 138 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/resolve_oids.c b/source4/dsdb/samdb/ldb_modules/resolve_oids.c
index 350364b..4f5c35e 100644
--- a/source4/dsdb/samdb/ldb_modules/resolve_oids.c
+++ b/source4/dsdb/samdb/ldb_modules/resolve_oids.c
@@ -156,10 +156,6 @@ static int resolve_oids_parse_tree_need(struct ldb_context *ldb,
 		return LDB_ERR_COMPARE_FALSE;
 	}
 
-	if (a->syntax->oMSyntax != 6) {
-		return LDB_ERR_COMPARE_FALSE;
-	}
-
 	return resolve_oids_need_value(ldb, schema, a, valp);
 }
 
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 4e1c14d..836b2ae 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -594,9 +594,9 @@ WERROR dsdb_attribute_from_ldb(struct ldb_context *ldb,
 		/* set an invalid value */
 		attr->attributeSyntax_id = 0xFFFFFFFF;
 	} else {
-		status = dsdb_schema_pfm_make_attid(schema->prefixmap,
-						    attr->attributeSyntax_oid,
-						    &attr->attributeSyntax_id);
+		status = dsdb_schema_pfm_attid_from_oid(schema->prefixmap,
+							attr->attributeSyntax_oid,
+							&attr->attributeSyntax_id);
 		if (!W_ERROR_IS_OK(status)) {
 			DEBUG(0,("%s: '%s': unable to map attributeSyntax_ %s: %s\n",
 				__location__, attr->lDAPDisplayName, attr->attributeSyntax_oid,
diff --git a/source4/torture/drs/drs_util.c b/source4/torture/drs/drs_util.c
index ba90cde..6de758e 100644
--- a/source4/torture/drs/drs_util.c
+++ b/source4/torture/drs/drs_util.c
@@ -94,80 +94,6 @@ bool drs_util_oid_from_attid(struct torture_context *tctx,
 	return true;
 }
 
-/**
- * Utility function to convert drsuapi_DsAttributeId to String
- */
-const char * drs_util_DsAttributeId_to_string(enum drsuapi_DsAttributeId r)
-{
-	const char *val = NULL;
-
-	switch (r) {
-	case DRSUAPI_ATTRIBUTE_objectClass: val = "DRSUAPI_ATTRIBUTE_objectClass"; break;
-	case DRSUAPI_ATTRIBUTE_description: val = "DRSUAPI_ATTRIBUTE_description"; break;
-	case DRSUAPI_ATTRIBUTE_member: val = "DRSUAPI_ATTRIBUTE_member"; break;
-	case DRSUAPI_ATTRIBUTE_instanceType: val = "DRSUAPI_ATTRIBUTE_instanceType"; break;
-	case DRSUAPI_ATTRIBUTE_whenCreated: val = "DRSUAPI_ATTRIBUTE_whenCreated"; break;
-	case DRSUAPI_ATTRIBUTE_hasMasterNCs: val = "DRSUAPI_ATTRIBUTE_hasMasterNCs"; break;
-	case DRSUAPI_ATTRIBUTE_governsID: val = "DRSUAPI_ATTRIBUTE_governsID"; break;
-	case DRSUAPI_ATTRIBUTE_attributeID: val = "DRSUAPI_ATTRIBUTE_attributeID"; break;
-	case DRSUAPI_ATTRIBUTE_attributeSyntax: val = "DRSUAPI_ATTRIBUTE_attributeSyntax"; break;
-	case DRSUAPI_ATTRIBUTE_isSingleValued: val = "DRSUAPI_ATTRIBUTE_isSingleValued"; break;
-	case DRSUAPI_ATTRIBUTE_rangeLower: val = "DRSUAPI_ATTRIBUTE_rangeLower"; break;
-	case DRSUAPI_ATTRIBUTE_rangeUpper: val = "DRSUAPI_ATTRIBUTE_rangeUpper"; break;
-	case DRSUAPI_ATTRIBUTE_dMDLocation: val = "DRSUAPI_ATTRIBUTE_dMDLocation"; break;
-	case DRSUAPI_ATTRIBUTE_objectVersion: val = "DRSUAPI_ATTRIBUTE_objectVersion"; break;
-	case DRSUAPI_ATTRIBUTE_invocationId: val = "DRSUAPI_ATTRIBUTE_invocationId"; break;
-	case DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly: val = "DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly"; break;
-	case DRSUAPI_ATTRIBUTE_adminDisplayName: val = "DRSUAPI_ATTRIBUTE_adminDisplayName"; break;
-	case DRSUAPI_ATTRIBUTE_adminDescription: val = "DRSUAPI_ATTRIBUTE_adminDescription"; break;
-	case DRSUAPI_ATTRIBUTE_oMSyntax: val = "DRSUAPI_ATTRIBUTE_oMSyntax"; break;
-	case DRSUAPI_ATTRIBUTE_ntSecurityDescriptor: val = "DRSUAPI_ATTRIBUTE_ntSecurityDescriptor"; break;
-	case DRSUAPI_ATTRIBUTE_searchFlags: val = "DRSUAPI_ATTRIBUTE_searchFlags"; break;
-	case DRSUAPI_ATTRIBUTE_lDAPDisplayName: val = "DRSUAPI_ATTRIBUTE_lDAPDisplayName"; break;
-	case DRSUAPI_ATTRIBUTE_name: val = "DRSUAPI_ATTRIBUTE_name"; break;
-	case DRSUAPI_ATTRIBUTE_userAccountControl: val = "DRSUAPI_ATTRIBUTE_userAccountControl"; break;
-	case DRSUAPI_ATTRIBUTE_currentValue: val = "DRSUAPI_ATTRIBUTE_currentValue"; break;
-	case DRSUAPI_ATTRIBUTE_homeDirectory: val = "DRSUAPI_ATTRIBUTE_homeDirectory"; break;
-	case DRSUAPI_ATTRIBUTE_homeDrive: val = "DRSUAPI_ATTRIBUTE_homeDrive"; break;
-	case DRSUAPI_ATTRIBUTE_scriptPath: val = "DRSUAPI_ATTRIBUTE_scriptPath"; break;
-	case DRSUAPI_ATTRIBUTE_profilePath: val = "DRSUAPI_ATTRIBUTE_profilePath"; break;
-	case DRSUAPI_ATTRIBUTE_objectSid: val = "DRSUAPI_ATTRIBUTE_objectSid"; break;
-	case DRSUAPI_ATTRIBUTE_schemaIDGUID: val = "DRSUAPI_ATTRIBUTE_schemaIDGUID"; break;
-	case DRSUAPI_ATTRIBUTE_dBCSPwd: val = "DRSUAPI_ATTRIBUTE_dBCSPwd"; break;
-	case DRSUAPI_ATTRIBUTE_logonHours: val = "DRSUAPI_ATTRIBUTE_logonHours"; break;
-	case DRSUAPI_ATTRIBUTE_userWorkstations: val = "DRSUAPI_ATTRIBUTE_userWorkstations"; break;
-	case DRSUAPI_ATTRIBUTE_unicodePwd: val = "DRSUAPI_ATTRIBUTE_unicodePwd"; break;
-	case DRSUAPI_ATTRIBUTE_ntPwdHistory: val = "DRSUAPI_ATTRIBUTE_ntPwdHistory"; break;
-	case DRSUAPI_ATTRIBUTE_priorValue: val = "DRSUAPI_ATTRIBUTE_priorValue"; break;
-	case DRSUAPI_ATTRIBUTE_supplementalCredentials: val = "DRSUAPI_ATTRIBUTE_supplementalCredentials"; break;
-	case DRSUAPI_ATTRIBUTE_trustAuthIncoming: val = "DRSUAPI_ATTRIBUTE_trustAuthIncoming"; break;
-	case DRSUAPI_ATTRIBUTE_trustAuthOutgoing: val = "DRSUAPI_ATTRIBUTE_trustAuthOutgoing"; break;
-	case DRSUAPI_ATTRIBUTE_lmPwdHistory: val = "DRSUAPI_ATTRIBUTE_lmPwdHistory"; break;
-	case DRSUAPI_ATTRIBUTE_sAMAccountName: val = "DRSUAPI_ATTRIBUTE_sAMAccountName"; break;
-	case DRSUAPI_ATTRIBUTE_sAMAccountType: val = "DRSUAPI_ATTRIBUTE_sAMAccountType"; break;
-	case DRSUAPI_ATTRIBUTE_fSMORoleOwner: val = "DRSUAPI_ATTRIBUTE_fSMORoleOwner"; break;
-	case DRSUAPI_ATTRIBUTE_systemFlags: val = "DRSUAPI_ATTRIBUTE_systemFlags"; break;
-	case DRSUAPI_ATTRIBUTE_serverReference: val = "DRSUAPI_ATTRIBUTE_serverReference"; break;
-	case DRSUAPI_ATTRIBUTE_serverReferenceBL: val = "DRSUAPI_ATTRIBUTE_serverReferenceBL"; break;
-	case DRSUAPI_ATTRIBUTE_initialAuthIncoming: val = "DRSUAPI_ATTRIBUTE_initialAuthIncoming"; break;
-	case DRSUAPI_ATTRIBUTE_initialAuthOutgoing: val = "DRSUAPI_ATTRIBUTE_initialAuthOutgoing"; break;
-	case DRSUAPI_ATTRIBUTE_wellKnownObjects: val = "DRSUAPI_ATTRIBUTE_wellKnownObjects"; break;
-	case DRSUAPI_ATTRIBUTE_dNSHostName: val = "DRSUAPI_ATTRIBUTE_dNSHostName"; break;
-	case DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet: val = "DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet"; break;
-	case DRSUAPI_ATTRIBUTE_userPrincipalName: val = "DRSUAPI_ATTRIBUTE_userPrincipalName"; break;
-	case DRSUAPI_ATTRIBUTE_groupType: val = "DRSUAPI_ATTRIBUTE_groupType"; break;
-	case DRSUAPI_ATTRIBUTE_servicePrincipalName: val = "DRSUAPI_ATTRIBUTE_servicePrincipalName"; break;
-	case DRSUAPI_ATTRIBUTE_objectCategory: val = "DRSUAPI_ATTRIBUTE_objectCategory"; break;
-	case DRSUAPI_ATTRIBUTE_gPLink: val = "DRSUAPI_ATTRIBUTE_gPLink"; break;
-	case DRSUAPI_ATTRIBUTE_msDS_Behavior_Version: val = "DRSUAPI_ATTRIBUTE_msDS_Behavior_Version"; break;
-	case DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber: val = "DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber"; break;
-	case DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs: val = "DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs"; break;
-	case DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs: val = "DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs"; break;
-	default: val = "UNKNOWN_ENUM_VALUE"; break;
-	}
-	return val;
-}
-
 
 /**
  * Loads dsdb_schema from ldb connection using remote prefixMap.
diff --git a/source4/torture/drs/unit/prefixmap_tests.c b/source4/torture/drs/unit/prefixmap_tests.c
index 5aba5d1..1d39f2d 100644
--- a/source4/torture/drs/unit/prefixmap_tests.c
+++ b/source4/torture/drs/unit/prefixmap_tests.c
@@ -3,7 +3,7 @@
 
    DRSUAPI prefixMap unit tests
 
-   Copyright (C) Kamen Mazdrashki <kamen.mazdrashki at postpath.com> 2009
+   Copyright (C) Kamen Mazdrashki <kamenim at samba.org> 2009-2010
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -52,7 +52,10 @@ struct drsut_pfm_oid_data {
 };
 
 /**
- * Default prefixMap initialization data
+ * Default prefixMap initialization data.
+ * This prefixMap is what dsdb_schema_pfm_new() should return.
+ * Based on: MS-DRSR, 5.16.4 ATTRTYP-to-OID Conversion
+ *           procedure NewPrefixTable( )
  */
 static const struct drsut_pfm_oid_data _prefixmap_test_new_data[] = {
 	{.id=0x00000000, .bin_oid="5504",                 .oid_prefix="2.5.4"},
@@ -77,7 +80,9 @@ static const struct drsut_pfm_oid_data _prefixmap_test_new_data[] = {
 };
 
 /**
- * Data to be used for creating full prefix map for testing
+ * Data to be used for creating full prefix map for testing.
+ * 'full-prefixMap' is based on what w2k8 returns as a prefixMap
+ * on clean installation - i.e. prefixMap for clean Schema
  */
 static const struct drsut_pfm_oid_data _prefixmap_full_map_data[] = {
 	{.id=0x00000000, .bin_oid="0x5504",                     .oid_prefix="2.5.4"},
@@ -134,30 +139,31 @@ static const struct drsut_pfm_oid_data _prefixmap_full_map_data[] = {
 
 
 /**
- * OID-to-ATTID mappings to be used for testing
+ * OID-to-ATTID mappings to be used for testing.
+ * An entry is marked as 'exists=true' if it exists in
+ * base prefixMap (_prefixmap_test_new_data)
  */
 static const struct {
 	const char 	*oid;
 	uint32_t 	id;
 	uint32_t 	attid;
+	bool		exists;
 } _prefixmap_test_data[] = {
-	{.oid="2.5.4.0", 		.id=0x00000000, .attid=0x000000},
-	{.oid="2.5.4.42", 		.id=0x00000000, .attid=0x00002a},
-	{.oid="1.2.840.113556.1.2.1", 	.id=0x00000002, .attid=0x020001},
-	{.oid="1.2.840.113556.1.2.13", 	.id=0x00000002, .attid=0x02000d},
-	{.oid="1.2.840.113556.1.2.281", .id=0x00000002, .attid=0x020119},
-	{.oid="1.2.840.113556.1.4.125", .id=0x00000009, .attid=0x09007d},
-	{.oid="1.2.840.113556.1.4.146", .id=0x00000009, .attid=0x090092},
-	{.oid="1.2.250.1", 	 	.id=0x00001b86, .attid=0x1b860001},
-	{.oid="1.2.250.130", 	 	.id=0x00001b86, .attid=0x1b860082},
-	{.oid="1.2.250.16386", 	 	.id=0x00001c78, .attid=0x1c788002},
-	{.oid="1.2.250.2097154", 	.id=0x00001c7b, .attid=0x1c7b8002},
+	{.oid="2.5.4.0", 		.id=0x00000000, .attid=0x000000,   .exists=true},
+	{.oid="2.5.4.42", 		.id=0x00000000, .attid=0x00002a,   .exists=true},
+	{.oid="1.2.840.113556.1.2.1", 	.id=0x00000002, .attid=0x020001,   .exists=true},
+	{.oid="1.2.840.113556.1.2.13", 	.id=0x00000002, .attid=0x02000d,   .exists=true},
+	{.oid="1.2.840.113556.1.2.281", .id=0x00000002, .attid=0x020119,   .exists=true},
+	{.oid="1.2.840.113556.1.4.125", .id=0x00000009, .attid=0x09007d,   .exists=true},
+	{.oid="1.2.840.113556.1.4.146", .id=0x00000009, .attid=0x090092,   .exists=true},
+	{.oid="1.2.250.1", 	 	.id=0x00001b86, .attid=0x1b860001, .exists=false},
+	{.oid="1.2.250.16386", 	 	.id=0x00001c78, .attid=0x1c788002, .exists=false},
+	{.oid="1.2.250.2097154", 	.id=0x00001c7b, .attid=0x1c7b8002, .exists=false},
 };
 
 
 /**
  * Creates dsdb_schema_prefixmap based on predefined data
- *
  */
 static WERROR _drsut_prefixmap_new(const struct drsut_pfm_oid_data *_pfm_init_data, uint32_t count,
 				   TALLOC_CTX *mem_ctx, struct dsdb_schema_prefixmap **_pfm)
@@ -189,6 +195,9 @@ static WERROR _drsut_prefixmap_new(const struct drsut_pfm_oid_data *_pfm_init_da
 	return WERR_OK;
 }
 
+/**
+ * Compares two prefixMaps for being equal - same items on same indexes
+ */
 static bool _torture_drs_pfm_compare_same(struct torture_context *tctx,
 					  const struct dsdb_schema_prefixmap *pfm_left,
 					  const struct dsdb_schema_prefixmap *pfm_right,
@@ -394,22 +403,6 @@ static bool torture_drs_unit_pfm_attid_from_oid_base_map(struct torture_context
 	struct dsdb_schema_prefixmap *pfm = NULL;
 	struct dsdb_schema_prefixmap pfm_prev;
 	TALLOC_CTX *mem_ctx;
-	const struct {
-		const char 	*oid;
-		uint32_t 	attid;
-		bool		exists;	/* if this prefix already exists or should be added */
-	} _test_data[] = {
-		{.oid="2.5.4.0", 		.attid=0x00000000, true},
-		{.oid="2.5.4.42", 		.attid=0x0000002a, true},
-		{.oid="1.2.840.113556.1.2.1", 	.attid=0x00020001, true},
-		{.oid="1.2.840.113556.1.2.13", 	.attid=0x0002000d, true},
-		{.oid="1.2.840.113556.1.2.281", .attid=0x00020119, true},
-		{.oid="1.2.840.113556.1.4.125", .attid=0x0009007d, true},
-		{.oid="1.2.840.113556.1.4.146", .attid=0x00090092, true},
-		{.oid="1.2.250.1", 	 	.attid=0x1b860001, false},
-		{.oid="1.2.250.16386", 	 	.attid=0x1c788002, false},
-		{.oid="1.2.250.2097154", 	.attid=0x1c7b8002, false},
-	};
 
 	mem_ctx = talloc_new(priv);
 	torture_assert(tctx, mem_ctx, "Unexpected: Have no memory!");
@@ -423,22 +416,24 @@ static bool torture_drs_unit_pfm_attid_from_oid_base_map(struct torture_context
 	pfm_prev.prefixes = talloc_reference(mem_ctx, pfm->prefixes);
 
 	/* get some ATTIDs and check result */
-	for (i = 0; i < ARRAY_SIZE(_test_data); i++) {
-		werr = dsdb_schema_pfm_attid_from_oid(pfm, _test_data[i].oid, &attid);
+	for (i = 0; i < ARRAY_SIZE(_prefixmap_test_data); i++) {
+		werr = dsdb_schema_pfm_attid_from_oid(pfm, _prefixmap_test_data[i].oid, &attid);
 
 		/* prepare error message */
 		err_msg = talloc_asprintf(mem_ctx,
 					  "dsdb_schema_pfm_attid_from_oid() failed for %s",
-					  _test_data[i].oid);
+					  _prefixmap_test_data[i].oid);
 		torture_assert(tctx, err_msg, "Unexpected: Have no memory!");
 
 
 		/* verify pfm hasn't been altered */
-		if (_test_data[i].exists) {
+		if (_prefixmap_test_data[i].exists) {
 			/* should succeed and return valid ATTID */
 			torture_assert_werr_ok(tctx, werr, err_msg);
 			/* verify ATTID */
-			torture_assert_int_equal(tctx, attid, _test_data[i].attid, err_msg);
+			torture_assert_int_equal(tctx,
+						 attid, _prefixmap_test_data[i].attid,
+						 err_msg);
 		} else {
 			/* should fail */
 			torture_assert_werr_equal(tctx, werr, WERR_NOT_FOUND, err_msg);
@@ -690,7 +685,7 @@ static bool torture_drs_unit_pfm_read_write_ldb(struct torture_context *tctx, st
 }
 
 /**
- * Test rdsdb_create_prefix_mapping
+ * Test dsdb_create_prefix_mapping
  */
 static bool torture_drs_unit_dsdb_create_prefix_mapping(struct torture_context *tctx, struct drsut_prefixmap_data *priv)
 {
@@ -698,22 +693,6 @@ static bool torture_drs_unit_dsdb_create_prefix_mapping(struct torture_context *
 	uint32_t i;
 	struct dsdb_schema *schema;
 	TALLOC_CTX *mem_ctx;
-	const struct {
-		const char 	*oid;
-		uint32_t 	attid;
-		bool		exists;	/* if this prefix already exists or should be added */
-	} _test_data[] = {
-		{.oid="2.5.4.0", 		.attid=0x00000000, true},
-		{.oid="2.5.4.42", 		.attid=0x0000002a, true},
-		{.oid="1.2.840.113556.1.2.1", 	.attid=0x00020001, true},
-		{.oid="1.2.840.113556.1.2.13", 	.attid=0x0002000d, true},
-		{.oid="1.2.840.113556.1.2.281", .attid=0x00020119, true},
-		{.oid="1.2.840.113556.1.4.125", .attid=0x0009007d, true},
-		{.oid="1.2.840.113556.1.4.146", .attid=0x00090092, true},
-		{.oid="1.2.250.1", 	 	.attid=0x1b860001, false},
-		{.oid="1.2.250.16386", 	 	.attid=0x1c788002, false},
-		{.oid="1.2.250.2097154", 	.attid=0x1c7b8002, false},
-	};
 
 	mem_ctx = talloc_new(tctx);
 	torture_assert(tctx, mem_ctx, "Unexpected: Have no memory!");
@@ -730,7 +709,7 @@ static bool torture_drs_unit_dsdb_create_prefix_mapping(struct torture_context *
 	werr = dsdb_write_prefixes_from_schema_to_ldb(mem_ctx, priv->ldb_ctx, schema);
 	torture_assert_werr_ok(tctx, werr, "dsdb_write_prefixes_from_schema_to_ldb() failed");
 
-	for (i = 0; i < ARRAY_SIZE(_test_data); i++) {
+	for (i = 0; i < ARRAY_SIZE(_prefixmap_test_data); i++) {
 		struct dsdb_schema_prefixmap *pfm_ldb;
 		struct dsdb_schema_prefixmap *pfm_prev;
 
@@ -738,11 +717,11 @@ static bool torture_drs_unit_dsdb_create_prefix_mapping(struct torture_context *
 		pfm_prev = talloc_reference(schema, schema->prefixmap);
 
 		/* call dsdb_create_prefix_mapping() and check result accordingly */
-		werr = dsdb_create_prefix_mapping(priv->ldb_ctx, schema, _test_data[i].oid);
+		werr = dsdb_create_prefix_mapping(priv->ldb_ctx, schema, _prefixmap_test_data[i].oid);
 		torture_assert_werr_ok(tctx, werr, "dsdb_create_prefix_mapping() failed");
 
 		/* verify pfm has been altered or not if needed */
-		if (_test_data[i].exists) {
+		if (_prefixmap_test_data[i].exists) {
 			torture_assert(tctx, pfm_prev == schema->prefixmap,
 				       "schema->prefixmap has been reallocated!");
 			if (!_torture_drs_pfm_compare_same(tctx, pfm_prev, schema->prefixmap, true)) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list