[SCM] Samba Shared Repository - branch master updated

Matthieu Patou mat at samba.org
Sat May 19 12:29:02 MDT 2012


The branch, master has been updated
       via  1d53e57 s4-dsdb: allow modification of some deleted object if the show-deleted control is presented
       via  db86686 s4-dsdb: naming context needs to have the extended-dn syntax too
       via  a9b4d7e libcli: make it easier to understand that a control was not correctly encoded
      from  32cbf20 Move the set_write_time() call to after get_existing_share_mode_lock() returns with a share mode.

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


- Log -----------------------------------------------------------------
commit 1d53e57bbfc6ea7ef4f18f41a9cba61f19d66793
Author: Matthieu Patou <mat at matws.net>
Date:   Fri May 11 14:25:49 2012 -0700

    s4-dsdb: allow modification of some deleted object if the show-deleted control is presented
    
    Autobuild-User: Matthieu Patou <mat at samba.org>
    Autobuild-Date: Sat May 19 20:28:01 CEST 2012 on sn-devel-104

commit db866864f73b25dedb3fc8d73072cd45ee69dca9
Author: Matthieu Patou <mat at matws.net>
Date:   Wed May 9 08:51:57 2012 -0700

    s4-dsdb: naming context needs to have the extended-dn syntax too

commit a9b4d7e7dea9ada8280806f416ef74343059b729
Author: Matthieu Patou <mat at matws.net>
Date:   Tue May 15 10:10:16 2012 -0700

    libcli: make it easier to understand that a control was not correctly encoded

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

Summary of changes:
 libcli/ldap/ldap_message.c                  |    2 +-
 source4/dsdb/samdb/ldb_modules/descriptor.c |   13 +++++++++----
 source4/dsdb/samdb/ldb_modules/rootdse.c    |    1 +
 3 files changed, 11 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/ldap/ldap_message.c b/libcli/ldap/ldap_message.c
index 0f54230..f640bf3 100644
--- a/libcli/ldap/ldap_message.c
+++ b/libcli/ldap/ldap_message.c
@@ -676,7 +676,7 @@ _PUBLIC_ bool ldap_encode(struct ldap_message *msg,
 			if (!ldap_encode_control(mem_ctx, data,
 						 control_handlers,
 						 msg->controls[i])) {
-				DEBUG(1,("Unable to encode control %s\n",
+				DEBUG(0,("Unable to encode control %s\n",
 					 msg->controls[i]->oid));
 				return false;
 			}
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c
index 18245a0..0a26288 100644
--- a/source4/dsdb/samdb/ldb_modules/descriptor.c
+++ b/source4/dsdb/samdb/ldb_modules/descriptor.c
@@ -581,7 +581,7 @@ static int descriptor_add(struct ldb_module *module, struct ldb_request *req)
 static int descriptor_modify(struct ldb_module *module, struct ldb_request *req)
 {
 	struct ldb_context *ldb;
-	struct ldb_control *sd_recalculate_control, *sd_flags_control;
+	struct ldb_control *sd_recalculate_control, *sd_flags_control, *show_deleted_control;
 	struct ldb_request *mod_req;
 	struct ldb_message *msg;
 	struct ldb_result *current_res, *parent_res;
@@ -591,7 +591,7 @@ static int descriptor_modify(struct ldb_module *module, struct ldb_request *req)
 	struct ldb_dn *parent_dn, *dn;
 	struct ldb_message_element *objectclass_element;
 	int ret;
-	uint32_t instanceType, sd_flags = 0;
+	uint32_t instanceType, sd_flags = 0, flags;
 	const struct dsdb_schema *schema;
 	DATA_BLOB *sd;
 	const struct dsdb_class *objectclass;
@@ -604,6 +604,8 @@ static int descriptor_modify(struct ldb_module *module, struct ldb_request *req)
 	user_sd = ldb_msg_find_ldb_val(req->op.mod.message, "nTSecurityDescriptor");
 	/* This control forces the recalculation of the SD also when
 	 * no modification is performed. */
+	show_deleted_control = ldb_request_get_control(req,
+					     LDB_CONTROL_SHOW_DELETED_OID);
 	sd_recalculate_control = ldb_request_get_control(req,
 					     LDB_CONTROL_RECALCULATE_SD_OID);
 	if (!user_sd && !sd_recalculate_control) {
@@ -616,10 +618,13 @@ static int descriptor_modify(struct ldb_module *module, struct ldb_request *req)
 	if (ldb_dn_is_special(dn)) {
 		return ldb_next_request(module, req);
 	}
-
+	flags = DSDB_FLAG_NEXT_MODULE;
+	if (show_deleted_control) {
+		flags |= DSDB_SEARCH_SHOW_DELETED;
+	}
 	ret = dsdb_module_search_dn(module, req, &current_res, dn,
 				    current_attrs,
-				    DSDB_FLAG_NEXT_MODULE,
+				    flags,
 				    req);
 	if (ret != LDB_SUCCESS) {
 		ldb_debug(ldb, LDB_DEBUG_ERROR,"descriptor_modify: Could not find %s\n",
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index f7c9896..6859d04 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -221,6 +221,7 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
 		"schemaNamingContext",
 		"serverName",
 		"validFSMOs",
+		"namingContexts",
 		NULL
 	};
 	const char *guid_attrs[] = {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list