[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-1005-g8536e1b

Matthias Dieter Wallnöfer mdw at samba.org
Tue Oct 6 11:42:13 MDT 2009


The branch, master has been updated
       via  8536e1b947ad8a2bc5596a9a1de9a58262153ebf (commit)
       via  0d7c34a5b4362ae8b1083a8bcf3a4115c37cafde (commit)
       via  b87769c9a98904bb18c737923de4cb8d619528d1 (commit)
      from  ac774c49691b08fa90121d5bd008618cfd4405e7 (commit)

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


- Log -----------------------------------------------------------------
commit 8536e1b947ad8a2bc5596a9a1de9a58262153ebf
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Tue Oct 6 19:27:17 2009 +0200

    s4:various LDB modules - "build_request" functions - propagate result codes back
    
    It's very useful to know the exact result code when something fails and not
    only a generic (by the module) created one.
    Sure, there are some exception cases with specific results (special message
    constellations, attributes, values...) which shouldn't be changed at all
    (examples of them are in the "ldap.py" test). Therefore I looked very
    carefully to not change them.

commit 0d7c34a5b4362ae8b1083a8bcf3a4115c37cafde
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Tue Oct 6 19:26:15 2009 +0200

    s4:rootdse module - intendation fixup

commit b87769c9a98904bb18c737923de4cb8d619528d1
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Tue Oct 6 19:24:28 2009 +0200

    s4:acl module - intendation fix and comment enhancement

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

Summary of changes:
 source4/dsdb/samdb/ldb_modules/acl.c            |    3 ++-
 source4/dsdb/samdb/ldb_modules/kludge_acl.c     |    2 +-
 source4/dsdb/samdb/ldb_modules/local_password.c |    5 ++---
 source4/dsdb/samdb/ldb_modules/objectguid.c     |    4 ++--
 source4/dsdb/samdb/ldb_modules/partition.c      |   20 ++++++++++++++------
 source4/dsdb/samdb/ldb_modules/rootdse.c        |    4 ++--
 source4/lib/ldb/modules/asq.c                   |    4 ++--
 source4/lib/ldb/modules/paged_results.c         |    3 +++
 source4/lib/ldb/modules/sort.c                  |    2 +-
 9 files changed, 29 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
index 1b02abc..2f12314 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -802,6 +802,7 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
+/* TODO Is this really right? */
 /*	if (what_is_user(module) == SECURITY_SYSTEM) */
 		return ldb_next_request(module, req);
 
@@ -813,7 +814,7 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
 	ac->user_type = what_is_user(module);
 	ac->sec_result = LDB_SUCCESS;
 	if (!is_root_base_dn(ldb, req->op.mod.message->dn) && parent && !is_root_base_dn(ldb, parent)){
-	  filter = talloc_asprintf(req,"(&(objectClass=*)(|(%s=%s)(%s=%s))))",
+		filter = talloc_asprintf(req,"(&(objectClass=*)(|(%s=%s)(%s=%s))))",
 				   ldb_dn_get_component_name(parent,0),
 				   ldb_dn_get_component_val(parent,0)->data,
 				   ldb_dn_get_component_name(req->op.mod.message->dn,0),
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
index 34f848d..79309e8 100644
--- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c
+++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
@@ -379,7 +379,7 @@ static int kludge_acl_search(struct ldb_module *module, struct ldb_request *req)
 					ac, kludge_acl_callback,
 					req);
 	if (ret != LDB_SUCCESS) {
-		return LDB_ERR_OPERATIONS_ERROR;
+		return ret;
 	}
 
 	/* check if there's an SD_FLAGS control */
diff --git a/source4/dsdb/samdb/ldb_modules/local_password.c b/source4/dsdb/samdb/ldb_modules/local_password.c
index 58c0f1f..9c386b3 100644
--- a/source4/dsdb/samdb/ldb_modules/local_password.c
+++ b/source4/dsdb/samdb/ldb_modules/local_password.c
@@ -633,8 +633,7 @@ static int lpdb_delete_callabck(struct ldb_request *req,
 
 	ret = ldb_next_request(ac->module, search_req);
 	if (ret != LDB_SUCCESS) {
-		return ldb_module_done(ac->req, NULL, NULL,
-					LDB_ERR_OPERATIONS_ERROR);
+		return ldb_module_done(ac->req, NULL, NULL, ret);
 	}
 	return LDB_SUCCESS;
 }
@@ -1082,7 +1081,7 @@ static int local_password_search(struct ldb_module *module, struct ldb_request *
 					ac, lpdb_remote_search_callback,
 					req);
 	if (ret != LDB_SUCCESS) {
-		return LDB_ERR_OPERATIONS_ERROR;
+		return ret;
 	}
 
 	/* perform the search */
diff --git a/source4/dsdb/samdb/ldb_modules/objectguid.c b/source4/dsdb/samdb/ldb_modules/objectguid.c
index 3d218ed..12dd402 100644
--- a/source4/dsdb/samdb/ldb_modules/objectguid.c
+++ b/source4/dsdb/samdb/ldb_modules/objectguid.c
@@ -209,7 +209,7 @@ static int objectguid_add(struct ldb_module *module, struct ldb_request *req)
 				ac, og_op_callback,
 				req);
 	if (ret != LDB_SUCCESS) {
-		return LDB_ERR_OPERATIONS_ERROR;
+		return ret;
 	}
 
 	/* go on with the call chain */
@@ -267,7 +267,7 @@ static int objectguid_modify(struct ldb_module *module, struct ldb_request *req)
 				ac, og_op_callback,
 				req);
 	if (ret != LDB_SUCCESS) {
-		return LDB_ERR_OPERATIONS_ERROR;
+		return ret;
 	}
 
 	/* go on with the call chain */
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 6e86d4c..c5bbdf8 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -829,14 +829,22 @@ static int partition_sequence_number(struct ldb_module *module, struct ldb_reque
 					     res,
 					     ldb_extended_default_callback,
 					     NULL);
-	       	ret = ldb_next_request(module, treq);
-		if (ret == LDB_SUCCESS) {
-			ret = ldb_wait(treq->handle, LDB_WAIT_ALL);
+		if (ret != LDB_SUCCESS) {
+			talloc_free(res);
+			return ret;
 		}
+
+		ret = ldb_next_request(module, treq);
 		if (ret != LDB_SUCCESS) {
 			talloc_free(res);
 			return ret;
 		}
+		ret = ldb_wait(treq->handle, LDB_WAIT_ALL);
+		if (ret != LDB_SUCCESS) {
+			talloc_free(res);
+			return ret;
+		}
+
 		seqr = talloc_get_type(res->extended->data,
 					struct ldb_seqnum_result);
 		if (seqr->flags & LDB_SEQ_TIMESTAMP_SEQUENCE) {
@@ -1083,7 +1091,7 @@ static int partition_extended_schema_update_now(struct ldb_module *module, struc
 	}
 
 	/* fire the first one */
-	ret =  partition_call_first(ac);
+	ret = partition_call_first(ac);
 
 	if (ret != LDB_SUCCESS){
 		return ret;
@@ -1385,14 +1393,14 @@ static int partition_init(struct ldb_module *module)
 	if (ret != LDB_SUCCESS) {
 		ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_ERROR,
 			"partition: Unable to register control with rootdse!\n");
-		return LDB_ERR_OPERATIONS_ERROR;
+		return ret;
 	}
 
 	ret = ldb_mod_register_control(module, LDB_CONTROL_SEARCH_OPTIONS_OID);
 	if (ret != LDB_SUCCESS) {
 		ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_ERROR,
 			"partition: Unable to register control with rootdse!\n");
-		return LDB_ERR_OPERATIONS_ERROR;
+		return ret;
 	}
 
 	talloc_free(mem_ctx);
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index a8e08ec..83e4e3b 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -722,9 +722,9 @@ static int rootdse_modify(struct ldb_module *module, struct ldb_request *req)
 }
 
 _PUBLIC_ const struct ldb_module_ops ldb_rootdse_module_ops = {
-	.name			= "rootdse",
+	.name		= "rootdse",
 	.init_context   = rootdse_init,
 	.search         = rootdse_search,
-	.request		= rootdse_request,
+	.request	= rootdse_request,
 	.modify         = rootdse_modify
 };
diff --git a/source4/lib/ldb/modules/asq.c b/source4/lib/ldb/modules/asq.c
index 0819f7f..4918683 100644
--- a/source4/lib/ldb/modules/asq.c
+++ b/source4/lib/ldb/modules/asq.c
@@ -237,7 +237,7 @@ static int asq_build_first_request(struct asq_context *ac, struct ldb_request **
 					ac, asq_base_callback,
 					ac->req);
 	if (ret != LDB_SUCCESS) {
-		return LDB_ERR_OPERATIONS_ERROR;
+		return ret;
 	}
 
 	return LDB_SUCCESS;
@@ -292,7 +292,7 @@ static int asq_build_multiple_requests(struct asq_context *ac, bool *terminated)
 						ac, asq_reqs_callback,
 						ac->req);
 		if (ret != LDB_SUCCESS) {
-			return LDB_ERR_OPERATIONS_ERROR;
+			return ret;
 		}
 
 		/* remove the ASQ control itself */
diff --git a/source4/lib/ldb/modules/paged_results.c b/source4/lib/ldb/modules/paged_results.c
index b712f84..774109f 100644
--- a/source4/lib/ldb/modules/paged_results.c
+++ b/source4/lib/ldb/modules/paged_results.c
@@ -347,6 +347,9 @@ static int paged_search(struct ldb_module *module, struct ldb_request *req)
 						ac,
 						paged_search_callback,
 						req);
+		if (ret != LDB_SUCCESS) {
+			return ret;
+		}
 
 		/* save it locally and remove it from the list */
 		/* we do not need to replace them later as we
diff --git a/source4/lib/ldb/modules/sort.c b/source4/lib/ldb/modules/sort.c
index b4ea017..f0aea77 100644
--- a/source4/lib/ldb/modules/sort.c
+++ b/source4/lib/ldb/modules/sort.c
@@ -315,7 +315,7 @@ static int server_sort_search(struct ldb_module *module, struct ldb_request *req
 					server_sort_search_callback,
 					req);
 	if (ret != LDB_SUCCESS) {
-		return LDB_ERR_OPERATIONS_ERROR;
+		return ret;
 	}
 
 	/* save it locally and remove it from the list */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list