[SCM] Samba Shared Repository - branch master updated

Kamen Mazdrashki kamenim at samba.org
Tue May 18 17:49:56 MDT 2010


The branch, master has been updated
       via  ad9050a... s4/drsuapi: Add another set of predefined ATTIDs
       via  799eb53... s4/metadata: fix whitespaces
       via  242b41a... s4/selftest: fix passwords in selftest-vars script
      from  6a90307... Fix our NTLMSSP implementation against the Microsoft torture tester.

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


- Log -----------------------------------------------------------------
commit ad9050a6ff57d847ba7d95f2cb33353d369dc42b
Author: Kamen Mazdrashki <kamenim at samba.org>
Date:   Wed May 19 02:29:20 2010 +0300

    s4/drsuapi: Add another set of predefined ATTIDs
    
    Very useful for debugging/dumping purposes

commit 799eb535a907ba6b6bad92d85d1ca7ac9f857dea
Author: Kamen Mazdrashki <kamenim at samba.org>
Date:   Wed May 19 02:28:09 2010 +0300

    s4/metadata: fix whitespaces

commit 242b41a3d8dfb5fd1cc1923e117f6d33bd145c55
Author: Kamen Mazdrashki <kamenim at samba.org>
Date:   Wed May 19 02:18:17 2010 +0300

    s4/selftest: fix passwords in selftest-vars script

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

Summary of changes:
 librpc/idl/drsuapi.idl                          |    6 +-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |  142 +++++++++++-----------
 source4/scripting/devel/selftest-vars.sh        |    4 +-
 3 files changed, 78 insertions(+), 74 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/drsuapi.idl b/librpc/idl/drsuapi.idl
index ef6ffef..cd99038 100644
--- a/librpc/idl/drsuapi.idl
+++ b/librpc/idl/drsuapi.idl
@@ -384,6 +384,7 @@ interface drsuapi
 	typedef [flag(NDR_PAHEX),v1_enum,public] enum {
 		DRSUAPI_ATTRIBUTE_objectClass			= 0x00000000,
 		DRSUAPI_ATTRIBUTE_cn				= 0x00000003,
+		DRSUAPI_ATTRIBUTE_ou				= 0x0000000b,
 		DRSUAPI_ATTRIBUTE_description			= 0x0000000d,
 		DRSUAPI_ATTRIBUTE_member			= 0x0000001f,
 		DRSUAPI_ATTRIBUTE_instanceType			= 0x00020001,
@@ -401,6 +402,7 @@ interface drsuapi
 		DRSUAPI_ATTRIBUTE_rangeLower			= 0x00020022,
 		DRSUAPI_ATTRIBUTE_rangeUpper			= 0x00020023,
 		DRSUAPI_ATTRIBUTE_dMDLocation			= 0x00020024,
+		DRSUAPI_ATTRIBUTE_isDeleted			= 0x00020030,
 		DRSUAPI_ATTRIBUTE_objectVersion			= 0x0002004c,
 		DRSUAPI_ATTRIBUTE_invocationId			= 0x00020073,
 		DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly	= 0x000200a9,
@@ -449,13 +451,15 @@ interface drsuapi
 		DRSUAPI_ATTRIBUTE_userPrincipalName		= 0x00090290,
 		DRSUAPI_ATTRIBUTE_groupType			= 0x000902ee,
 		DRSUAPI_ATTRIBUTE_servicePrincipalName		= 0x00090303,
+		DRSUAPI_ATTRIBUTE_lastKnownParent		= 0x0009030d,
 		DRSUAPI_ATTRIBUTE_objectCategory		= 0x0009030e,
 		DRSUAPI_ATTRIBUTE_gPLink			= 0x0009037b,
 		DRSUAPI_ATTRIBUTE_transportAddressAttribute	= 0x0009037f,
 		DRSUAPI_ATTRIBUTE_msDS_Behavior_Version		= 0x000905b3,
 		DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber		= 0x000906f6,
 		DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs		= 0x0009071c,
-		DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs		= 0x0009072c,		
+		DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs		= 0x0009072c,
+		DRSUAPI_ATTRIBUTE_isRecycled			= 0x0009080a,
 		DRSUAPI_ATTRIBUTE_NONE				= 0xFFFFFFFF
 	} drsuapi_DsAttributeId;
 
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 72ffd0e..db2415b 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -1,4 +1,4 @@
-/* 
+/*
    ldb database library
 
    Copyright (C) Simo Sorce  2004-2008
@@ -10,12 +10,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -349,7 +349,7 @@ static int replmd_add_backlink(struct ldb_module *module, const struct dsdb_sche
 
 /*
  * Callback for most write operations in this module:
- * 
+ *
  * notify the repl task that a object has changed. The notifies are
  * gathered up in the replmd_private structure then written to the
  * @REPLCHANGED object in each partition during the prepare_commit
@@ -357,9 +357,9 @@ static int replmd_add_backlink(struct ldb_module *module, const struct dsdb_sche
 static int replmd_op_callback(struct ldb_request *req, struct ldb_reply *ares)
 {
 	int ret;
-	struct replmd_replicated_request *ac = 
+	struct replmd_replicated_request *ac =
 		talloc_get_type_abort(req->context, struct replmd_replicated_request);
-	struct replmd_private *replmd_private = 
+	struct replmd_private *replmd_private =
 		talloc_get_type_abort(ldb_module_get_private(ac->module), struct replmd_private);
 	struct nc_entry *modified_partition;
 	struct ldb_control *partition_ctrl;
@@ -391,15 +391,15 @@ static int replmd_op_callback(struct ldb_request *req, struct ldb_reply *ares)
 
 	partition = talloc_get_type_abort(partition_ctrl->data,
 				    struct dsdb_control_current_partition);
-	
+
 	if (ac->seq_num > 0) {
-		for (modified_partition = replmd_private->ncs; modified_partition; 
+		for (modified_partition = replmd_private->ncs; modified_partition;
 		     modified_partition = modified_partition->next) {
 			if (ldb_dn_compare(modified_partition->dn, partition->dn) == 0) {
 				break;
 			}
 		}
-		
+
 		if (modified_partition == NULL) {
 			modified_partition = talloc_zero(replmd_private, struct nc_entry);
 			if (!modified_partition) {
@@ -427,7 +427,7 @@ static int replmd_op_callback(struct ldb_request *req, struct ldb_reply *ares)
 	if (ac->apply_mode) {
 		talloc_free(ares);
 		ac->index_current++;
-		
+
 		ret = replmd_replicated_apply_next(ac);
 		if (ret != LDB_SUCCESS) {
 			return ldb_module_done(ac->req, NULL, NULL, ret);
@@ -438,7 +438,7 @@ static int replmd_op_callback(struct ldb_request *req, struct ldb_reply *ares)
 		 * common path.  Other cases will have it cleaned up
 		 * eventually with the ares */
 		talloc_free(partition_ctrl);
-		return ldb_module_done(ac->req, 
+		return ldb_module_done(ac->req,
 				       controls_except_specified(controls, ares, partition_ctrl),
 				       ares->response, LDB_SUCCESS);
 	}
@@ -602,10 +602,10 @@ static int replmd_replPropertyMetaDataCtr1_sort(struct replPropertyMetaDataCtr1
 	rdn_sa = dsdb_attribute_by_lDAPDisplayName(schema, rdn_name);
 	if (rdn_sa == NULL) {
 		DEBUG(0,(__location__ ": No sa found for rDN %s for %s\n", rdn_name, ldb_dn_get_linearized(dn)));
-		return LDB_ERR_OPERATIONS_ERROR;		
+		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
-	DEBUG(6,("Sorting rpmd with attid exception %u rDN=%s DN=%s\n", 
+	DEBUG(6,("Sorting rpmd with attid exception %u rDN=%s DN=%s\n",
 		 rdn_sa->attributeID_id, rdn_name, ldb_dn_get_linearized(dn)));
 
 	LDB_TYPESAFE_QSORT(ctr1->array, ctr1->count, &rdn_sa->attributeID_id, replmd_replPropertyMetaData1_attid_sort);
@@ -620,7 +620,7 @@ static int replmd_ldb_message_element_attid_sort(const struct ldb_message_elemen
 	const struct dsdb_attribute *a1;
 	const struct dsdb_attribute *a2;
 
-	/* 
+	/*
 	 * TODO: make this faster by caching the dsdb_attribute pointer
 	 *       on the ldb_messag_element
 	 */
@@ -775,7 +775,7 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req)
 				talloc_free(ac);
 				return LDB_ERR_UNWILLING_TO_PERFORM;
 			}
-			/* we remove this attribute as it can be a string and will not be treated 
+			/* we remove this attribute as it can be a string and will not be treated
 			correctly and then we will readd it latter on in the good format*/
 			remove_current_guid = true;
 		}
@@ -820,7 +820,7 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req)
 		ldb_msg_remove_attr(msg,"objectGUID");
 	}
 
-	/* 
+	/*
 	 * remove autogenerated attributes
 	 */
 	ldb_msg_remove_attr(msg, "whenCreated");
@@ -910,7 +910,7 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req)
 	}
 
 	/* generated NDR encoded values */
-	ndr_err = ndr_push_struct_blob(&nmd_value, msg, 
+	ndr_err = ndr_push_struct_blob(&nmd_value, msg,
 				       &nmd,
 				       (ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob);
 	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1036,7 +1036,7 @@ static int replmd_update_rpmd_element(struct ldb_context *ldb,
 
 	if (i == omd->ctr.ctr1.count) {
 		/* we need to add a new one */
-		omd->ctr.ctr1.array = talloc_realloc(msg, omd->ctr.ctr1.array, 
+		omd->ctr.ctr1.array = talloc_realloc(msg, omd->ctr.ctr1.array,
 						     struct replPropertyMetaData1, omd->ctr.ctr1.count+1);
 		if (omd->ctr.ctr1.array == NULL) {
 			ldb_oom(ldb);
@@ -1048,7 +1048,7 @@ static int replmd_update_rpmd_element(struct ldb_context *ldb,
 
 	/* Get a new sequence number from the backend. We only do this
 	 * if we have a change that requires a new
-	 * replPropertyMetaData element 
+	 * replPropertyMetaData element
 	 */
 	if (*seq_num == 0) {
 		int ret = ldb_sequence_number(ldb, LDB_SEQ_NEXT, seq_num);
@@ -1064,17 +1064,17 @@ static int replmd_update_rpmd_element(struct ldb_context *ldb,
 	md1->originating_invocation_id = *our_invocation_id;
 	md1->originating_usn           = *seq_num;
 	md1->local_usn                 = *seq_num;
-	
+
 	return LDB_SUCCESS;
 }
 
 /*
  * update the replPropertyMetaData object each time we modify an
  * object. This is needed for DRS replication, as the merge on the
- * client is based on this object 
+ * client is based on this object
  */
-static int replmd_update_rpmd(struct ldb_module *module, 
-			      const struct dsdb_schema *schema, 
+static int replmd_update_rpmd(struct ldb_module *module,
+			      const struct dsdb_schema *schema,
 			      struct ldb_request *req,
 			      struct ldb_message *msg, uint64_t *seq_num,
 			      time_t t,
@@ -1224,7 +1224,7 @@ static int replmd_update_rpmd(struct ldb_module *module,
 		el->values = md_value;
 	}
 
-	return LDB_SUCCESS;	
+	return LDB_SUCCESS;
 }
 
 struct parsed_dn {
@@ -1588,7 +1588,7 @@ static int replmd_modify_la_add(struct ldb_module *module,
 		talloc_free(tmp_ctx);
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
-	
+
 	ret = replmd_check_upgrade_links(old_dns, old_num_values, old_el, invocation_id);
 	if (ret != LDB_SUCCESS) {
 		talloc_free(tmp_ctx);
@@ -2247,7 +2247,7 @@ static int replmd_rename_callback(struct ldb_request *req, struct ldb_reply *are
 		talloc_free(ac);
 		return ret;
 	}
-	
+
 	if (add_uint64_element(msg, "uSNChanged", ac->seq_num) != LDB_SUCCESS) {
 		talloc_free(ac);
 		return ret;
@@ -2380,7 +2380,7 @@ static int replmd_delete(struct ldb_module *module, struct ldb_request *req)
 		ldb_oom(ldb);
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
-	
+
 	schema = dsdb_get_schema(ldb, tmp_ctx);
 	if (!schema) {
 		return LDB_ERR_OPERATIONS_ERROR;
@@ -2590,7 +2590,7 @@ static int replmd_delete(struct ldb_module *module, struct ldb_request *req)
 				continue;
 			}
 			if (sa->linkID && sa->linkID & 1) {
-			ret = replmd_delete_remove_link(module, schema, old_dn, el, sa);
+				ret = replmd_delete_remove_link(module, schema, old_dn, el, sa);
 				if (ret != LDB_SUCCESS) {
 					talloc_free(tmp_ctx);
 					return LDB_ERR_OPERATIONS_ERROR;
@@ -2738,7 +2738,7 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar)
 			continue;
 		}
 	}
-	
+
 	/*
 	 * the meta data array is already sorted by the caller
 	 */
@@ -3242,7 +3242,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
 			if (ruv->cursors[i].highest_usn > nuv.ctr.ctr2.cursors[j].highest_usn) {
 				nuv.ctr.ctr2.cursors[j].highest_usn = ruv->cursors[i].highest_usn;
 			}
-			break;			
+			break;
 		}
 
 		if (found) continue;
@@ -3357,7 +3357,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
 			/*
 			 * we compare the source dsa objectGUID not the invocation_id
 			 * because we want only one repsFrom value per source dsa
-			 * and when the invocation_id of the source dsa has changed we don't need 
+			 * and when the invocation_id of the source dsa has changed we don't need
 			 * the old repsFrom with the old invocation_id
 			 */
 			if (!GUID_equal(&trf->ctr.ctr1.source_dsa_obj_guid,
@@ -3393,7 +3393,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
 	}
 
 	/* we now fill the value which is already attached to ldb_message */
-	ndr_err = ndr_push_struct_blob(nrf_value, msg, 
+	ndr_err = ndr_push_struct_blob(nrf_value, msg,
 				       &nrf,
 				       (ndr_push_flags_fn_t)ndr_push_repsFromToBlob);
 	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -3401,7 +3401,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
 		return replmd_replicated_request_werror(ar, ntstatus_to_werror(nt_status));
 	}
 
-	/* 
+	/*
 	 * the ldb_message_element for the attribute, has all the old values and the new one
 	 * so we'll replace the whole attribute with all values
 	 */
@@ -3509,7 +3509,7 @@ static int replmd_extended_replicated_objects(struct ldb_module *module, struct
 	struct ldb_control **ctrls;
 	int ret;
 	uint32_t i;
-	struct replmd_private *replmd_private = 
+	struct replmd_private *replmd_private =
 		talloc_get_type(ldb_module_get_private(module), struct replmd_private);
 
 	ldb = ldb_module_get_ctx(module);
@@ -3598,7 +3598,7 @@ static int replmd_extended_replicated_objects(struct ldb_module *module, struct
  */
 static int replmd_process_linked_attribute(struct ldb_module *module,
 					   struct la_entry *la_entry)
-{					   
+{
 	struct drsuapi_DsReplicaLinkedAttribute *la = la_entry->la;
 	struct ldb_context *ldb = ldb_module_get_ctx(module);
 	struct ldb_message *msg;
@@ -3620,40 +3620,40 @@ static int replmd_process_linked_attribute(struct ldb_module *module,
 	const struct GUID *our_invocation_id;
 
 /*
-linked_attributes[0]:                                                     
-     &objs->linked_attributes[i]: struct drsuapi_DsReplicaLinkedAttribute 
-        identifier               : *                                      
-            identifier: struct drsuapi_DsReplicaObjectIdentifier          
-                __ndr_size               : 0x0000003a (58)                
-                __ndr_size_sid           : 0x00000000 (0)                 
+linked_attributes[0]:
+     &objs->linked_attributes[i]: struct drsuapi_DsReplicaLinkedAttribute
+        identifier               : *
+            identifier: struct drsuapi_DsReplicaObjectIdentifier
+                __ndr_size               : 0x0000003a (58)
+                __ndr_size_sid           : 0x00000000 (0)
                 guid                     : 8e95b6a9-13dd-4158-89db-3220a5be5cc7
-                sid                      : S-0-0                               
-                __ndr_size_dn            : 0x00000000 (0)                      
-                dn                       : ''                                  
-        attid                    : DRSUAPI_ATTRIBUTE_member (0x1F)             
-        value: struct drsuapi_DsAttributeValue                                 
-            __ndr_size               : 0x0000007e (126)                        
-            blob                     : *                                       
-                blob                     : DATA_BLOB length=126                
-        flags                    : 0x00000001 (1)                              
-               1: DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE                      
-        originating_add_time     : Wed Sep  2 22:20:01 2009 EST                
-        meta_data: struct drsuapi_DsReplicaMetaData                            
-            version                  : 0x00000015 (21)                         
-            originating_change_time  : Wed Sep  2 23:39:07 2009 EST            
-            originating_invocation_id: 794640f3-18cf-40ee-a211-a93992b67a64    
-            originating_usn          : 0x000000000001e19c (123292)             
+                sid                      : S-0-0
+                __ndr_size_dn            : 0x00000000 (0)
+                dn                       : ''
+        attid                    : DRSUAPI_ATTRIBUTE_member (0x1F)
+        value: struct drsuapi_DsAttributeValue
+            __ndr_size               : 0x0000007e (126)
+            blob                     : *
+                blob                     : DATA_BLOB length=126
+        flags                    : 0x00000001 (1)
+               1: DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE
+        originating_add_time     : Wed Sep  2 22:20:01 2009 EST
+        meta_data: struct drsuapi_DsReplicaMetaData
+            version                  : 0x00000015 (21)
+            originating_change_time  : Wed Sep  2 23:39:07 2009 EST
+            originating_invocation_id: 794640f3-18cf-40ee-a211-a93992b67a64
+            originating_usn          : 0x000000000001e19c (123292)
 
 (for cases where the link is to a normal DN)
-     &target: struct drsuapi_DsReplicaObjectIdentifier3                        
-        __ndr_size               : 0x0000007e (126)                            
-        __ndr_size_sid           : 0x0000001c (28)                             
-        guid                     : 7639e594-db75-4086-b0d4-67890ae46031        
+     &target: struct drsuapi_DsReplicaObjectIdentifier3
+        __ndr_size               : 0x0000007e (126)
+        __ndr_size_sid           : 0x0000001c (28)
+        guid                     : 7639e594-db75-4086-b0d4-67890ae46031
         sid                      : S-1-5-21-2848215498-2472035911-1947525656-19924
-        __ndr_size_dn            : 0x00000022 (34)                                
-        dn                       : 'CN=UOne,OU=TestOU,DC=vsofs8,DC=com'           
+        __ndr_size_dn            : 0x00000022 (34)
+        dn                       : 'CN=UOne,OU=TestOU,DC=vsofs8,DC=com'
  */
-	
+
 	/* find the attribute being modified */
 	attr = dsdb_attribute_by_attributeID_id(schema, la->attid);
 	if (attr == NULL) {
@@ -3868,10 +3868,10 @@ linked_attributes[0]:
 		talloc_free(tmp_ctx);
 		return ret;
 	}
-	
+
 	talloc_free(tmp_ctx);
 
-	return ret;	
+	return ret;
 }
 
 static int replmd_extended(struct ldb_module *module, struct ldb_request *req)
@@ -3885,7 +3885,7 @@ static int replmd_extended(struct ldb_module *module, struct ldb_request *req)
 
 
 /*
-  we hook into the transaction operations to allow us to 
+  we hook into the transaction operations to allow us to
   perform the linked attribute updates at the end of the whole
   transaction. This allows a forward linked attribute to be created
   before the object is created. During a vampire, w2k8 sends us linked
@@ -3911,11 +3911,11 @@ static int replmd_start_transaction(struct ldb_module *module)
 
 /*
   on prepare commit we loop over our queued la_context structures and
-  apply each of them  
+  apply each of them
  */
 static int replmd_prepare_commit(struct ldb_module *module)
 {
-	struct replmd_private *replmd_private = 
+	struct replmd_private *replmd_private =
 		talloc_get_type(ldb_module_get_private(module), struct replmd_private);
 	struct la_entry *la, *prev;
 	struct la_backlink *bl;
@@ -3951,13 +3951,13 @@ static int replmd_prepare_commit(struct ldb_module *module)
 	if (ret != LDB_SUCCESS) {
 		return ret;
 	}
-	
+
 	return ldb_next_prepare_commit(module);
 }
 
 static int replmd_del_transaction(struct ldb_module *module)
 {
-	struct replmd_private *replmd_private = 
+	struct replmd_private *replmd_private =
 		talloc_get_type(ldb_module_get_private(module), struct replmd_private);
 	replmd_txn_cleanup(replmd_private);
 
diff --git a/source4/scripting/devel/selftest-vars.sh b/source4/scripting/devel/selftest-vars.sh
index f275cea..0932b62 100644
--- a/source4/scripting/devel/selftest-vars.sh
+++ b/source4/scripting/devel/selftest-vars.sh
@@ -39,9 +39,9 @@ export TLS_ENABLED=yes
 export DC_NETBIOSALIAS=localdc
 export DC_NETBIOSNAME=localdc1
 export DC_SERVER=localdc1
-export DC_PASSWORD=localdcpass
+export DC_PASSWORD=locDCpass0
 export PYTHONPATH=$PWD/bin/python
-export PASSWORD=localdcpass
+export PASSWORD=locDCpass0
 export LDB_MODULES_PATH=$PWD/bin/modules/ldb
 export NETBIOSALIAS=localdc
 export SMB_CONF_PATH=$PWD/st/dc/etc/smb.conf


-- 
Samba Shared Repository


More information about the samba-cvs mailing list