Add some debug for FOOBAR return case as they are hard to diagnose
authorMatthieu Patou <mat@matws.net>
Sun, 29 Apr 2012 05:12:40 +0000 (22:12 -0700)
committerMatthieu Patou <mat@samba.org>
Sun, 29 Apr 2012 07:08:15 +0000 (09:08 +0200)
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Apr 29 09:08:15 CEST 2012 on sn-devel-104

source4/dsdb/schema/schema_syntax.c
source4/libnet/libnet_vampire.c

index 0a5438ba976e024bb37d7091570e8b4026e6b6c0..6d63023b1a8c3aaaa8339d1df0cf1a1cd8e17508 100644 (file)
@@ -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);
index fad80eca807e5c5db197b264c67bc1b01735eac9..f06e4a4cb2e025172647844c2be9ab616c371959 100644 (file)
@@ -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;
                }