[SCM] Samba Shared Repository - branch master updated - 596089ec06b0a2b2ec3e0e5bd6d46c2e767bd954

Andrew Bartlett abartlet at samba.org
Thu Oct 23 01:57:13 GMT 2008


The branch, master has been updated
       via  596089ec06b0a2b2ec3e0e5bd6d46c2e767bd954 (commit)
       via  e79835b096c716124ac5d6e78610e5a76172e649 (commit)
      from  2f1dbddc3f5433b5b5c542cd3c8fa3050499d8e9 (commit)

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


- Log -----------------------------------------------------------------
commit 596089ec06b0a2b2ec3e0e5bd6d46c2e767bd954
Merge: e79835b096c716124ac5d6e78610e5a76172e649 2f1dbddc3f5433b5b5c542cd3c8fa3050499d8e9
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Oct 23 12:56:30 2008 +1100

    Merge branch 'master' of ssh://git.samba.org/data/git/samba into master-devel

commit e79835b096c716124ac5d6e78610e5a76172e649
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Oct 23 12:50:22 2008 +1100

    Clarify the linked attribute module behaviour with comments

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

Summary of changes:
 source4/dsdb/samdb/ldb_modules/linked_attributes.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index 14fd107..190a66c 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -466,6 +466,9 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
 					}
 				}
 			} else {
+				/* Flag that there was a DELETE
+				 * without a value specified, so we
+				 * need to look for the old value */
 				store_el = true;
 			}
 
@@ -475,6 +478,7 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
 		if (store_el) {
 			struct ldb_message_element *search_el;
 
+			/* Fill out ac->rc only if we have to find the old values */
 			if (!ac->rc) {
 				ac->rc = talloc_zero(ac, struct replace_context);
 				if (!ac->rc) {
@@ -499,6 +503,9 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
 
 	/* both replace and delete without values are handled in the callback
 	 * after the search on the entry to be modified is performed */
+
+	/* Only bother doing a search of this entry (to find old
+	 * values) if replace or delete operations are attempted */
 	if (ac->rc) {
 		const char **attrs;
 
@@ -527,9 +534,10 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
 			ret = ldb_next_request(module, search_req);
 		}
 
+		
 	} else {
 		if (ac->ops) {
-			/* start the mod requests chain */
+			/* Jump directly to handling the modifies */
 			ret = la_do_mod_request(ac);
 		} else {
 			/* nothing to do for this module, proceed */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list