[SCM] Samba Shared Repository - branch master updated

Matthieu Patou mat at samba.org
Sun Apr 29 01:09:03 MDT 2012


The branch, master has been updated
       via  b019248 Add some debug for FOOBAR return case as they are hard to diagnose
       via  3616735 dsdb: more RELAX to DBCHECK control shift so that only dbcheck can do uncontrolled changes
       via  441b208 dsdb: change control from relax to dbcheck
       via  e2a1690 dns server: move very verbose debug to higher level 2 -> 8
      from  5712e51 s3: Remove a SMB_ASSERT

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


- Log -----------------------------------------------------------------
commit b019248fe85025f9df0cc20484f7b5f65838dc09
Author: Matthieu Patou <mat at matws.net>
Date:   Sat Apr 28 22:12:40 2012 -0700

    Add some debug for FOOBAR return case as they are hard to diagnose
    
    Autobuild-User: Matthieu Patou <mat at samba.org>
    Autobuild-Date: Sun Apr 29 09:08:15 CEST 2012 on sn-devel-104

commit 361673501039e3252db39696af116b2e03ff6427
Author: Matthieu Patou <mat at matws.net>
Date:   Sat Apr 28 21:51:12 2012 -0700

    dsdb: more RELAX to DBCHECK control shift so that only dbcheck can do uncontrolled changes

commit 441b20872bd4eebc47bf68223694a1f71f833bb5
Author: Matthieu Patou <mat at matws.net>
Date:   Sat Apr 28 15:55:06 2012 -0700

    dsdb: change control from relax to dbcheck
    
    Comment indicate that this is needed by dbcheck only and it permits
    other projects to push broken schema and remain undetected

commit e2a16909a12de08d6541ef7d4936d1ab5f46284d
Author: Matthieu Patou <mat at matws.net>
Date:   Sat Apr 28 15:53:41 2012 -0700

    dns server: move very verbose debug to higher level 2 -> 8

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

Summary of changes:
 source4/dns_server/dns_server.c                    |    8 ++++----
 source4/dsdb/samdb/ldb_modules/objectclass_attrs.c |    6 +++---
 source4/dsdb/schema/schema_syntax.c                |    3 +++
 source4/libnet/libnet_vampire.c                    |    7 +++++--
 4 files changed, 15 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c
index 789940f..eed20d5 100644
--- a/source4/dns_server/dns_server.c
+++ b/source4/dns_server/dns_server.c
@@ -119,7 +119,7 @@ static NTSTATUS dns_process(struct dns_server *dns,
 	if (in_packet == NULL) return NT_STATUS_NO_MEMORY;
 	if (out_packet == NULL) return NT_STATUS_NO_MEMORY;
 
-	dump_data(2, in->data, in->length);
+	dump_data(8, in->data, in->length);
 
 	ndr_err = ndr_pull_struct_blob(in, in_packet, in_packet,
 			(ndr_pull_flags_fn_t)ndr_pull_dns_name_packet);
@@ -133,7 +133,7 @@ static NTSTATUS dns_process(struct dns_server *dns,
 
 		return NT_STATUS_OK;
 	}
-	if (DEBUGLVL(2)) {
+	if (DEBUGLVL(8)) {
 		NDR_PRINT_DEBUG(dns_name_packet, in_packet);
 	}
 	*out_packet = *in_packet;
@@ -180,7 +180,7 @@ static NTSTATUS dns_process(struct dns_server *dns,
 
 	out_packet->operation |= state->flags;
 
-	if (DEBUGLVL(2)) {
+	if (DEBUGLVL(8)) {
 		NDR_PRINT_DEBUG(dns_name_packet, out_packet);
 	}
 	ndr_err = ndr_push_struct_blob(out, out_packet, out_packet,
@@ -197,7 +197,7 @@ static NTSTATUS dns_process(struct dns_server *dns,
 		return NT_STATUS_OK;
 	}
 
-	dump_data(2, out->data, out->length);
+	dump_data(8, out->data, out->length);
 	return NT_STATUS_OK;
 }
 
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
index d45c46f..1fd850a 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
@@ -192,7 +192,7 @@ static int attr_handler(struct oc_context *ac)
 		attr = dsdb_attribute_by_lDAPDisplayName(ac->schema,
 							 msg->elements[i].name);
 		if (attr == NULL) {
-			if (ldb_request_get_control(ac->req, LDB_CONTROL_RELAX_OID) &&
+			if (ldb_request_get_control(ac->req, DSDB_CONTROL_DBCHECK) &&
 			    ac->req->operation != LDB_ADD) {
 				/* we allow this for dbcheck to fix
 				   broken attributes */
@@ -219,7 +219,7 @@ static int attr_handler(struct oc_context *ac)
 			werr = attr->syntax->validate_ldb(&syntax_ctx, attr,
 							  &msg->elements[i]);
 			if (!W_ERROR_IS_OK(werr) &&
-			    !ldb_request_get_control(ac->req, LDB_CONTROL_RELAX_OID)) {
+			    !ldb_request_get_control(ac->req, DSDB_CONTROL_DBCHECK)) {
 				ldb_asprintf_errstring(ldb, "objectclass_attrs: attribute '%s' on entry '%s' contains at least one invalid value!",
 						       msg->elements[i].name,
 						       ldb_dn_get_linearized(msg->dn));
@@ -384,7 +384,7 @@ static int attr_handler2(struct oc_context *ac)
 		attr = dsdb_attribute_by_lDAPDisplayName(ac->schema,
 							 msg->elements[i].name);
 		if (attr == NULL) {
-			if (ldb_request_get_control(ac->req, LDB_CONTROL_RELAX_OID)) {
+			if (ldb_request_get_control(ac->req, DSDB_CONTROL_DBCHECK)) {
 				/* allow this to make it possible for dbcheck
 				   to remove bad attributes */
 				continue;
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index 0a5438b..6d63023 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -1054,10 +1054,12 @@ static WERROR _dsdb_syntax_OID_attr_drsuapi_to_ldb(const struct dsdb_syntax_ctx
 		const char *str;
 
 		if (in->value_ctr.values[i].blob == NULL) {
+			DEBUG(0, ("Attribute has no value\n"));
 			return WERR_FOOBAR;
 		}
 
 		if (in->value_ctr.values[i].blob->length != 4) {
+			DEBUG(0, ("Attribute has a value with 0 length\n"));
 			return WERR_FOOBAR;
 		}
 
@@ -1264,6 +1266,7 @@ static WERROR _dsdb_syntax_OID_attr_ldb_to_drsuapi(const struct dsdb_syntax_ctx
 
 		obj_attr = dsdb_attribute_by_lDAPDisplayName(ctx->schema, (const char *)in->values[i].data);
 		if (!obj_attr) {
+			DEBUG(0, ("Unable to find attribute %s in the schema\n", (const char *)in->values[i].data));
 			return WERR_FOOBAR;
 		}
 		SIVAL(blobs[i].data, 0, obj_attr->attributeID_id);
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index fad80ec..f06e4a4 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -788,16 +788,19 @@ NTSTATUS libnet_vampire_cb_store_chunk(void *private_data,
 		const struct dsdb_attribute *sa;
 
 		if (!linked_attributes[i].identifier) {
-			return NT_STATUS_FOOBAR;		
+			DEBUG(0, ("No linked attribute identifier\n"));
+			return NT_STATUS_FOOBAR;
 		}
 
 		if (!linked_attributes[i].value.blob) {
-			return NT_STATUS_FOOBAR;		
+			DEBUG(0, ("No linked attribute value\n"));
+			return NT_STATUS_FOOBAR;
 		}
 
 		sa = dsdb_attribute_by_attributeID_id(s->schema,
 						      linked_attributes[i].attid);
 		if (!sa) {
+			DEBUG(0, ("Unable to find attribute via attribute id %d\n", linked_attributes[i].attid));
 			return NT_STATUS_FOOBAR;
 		}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list