s4-extended: do not try to fix if there is no schema
authorMatthieu Patou <mat@matws.net>
Wed, 30 May 2012 17:57:06 +0000 (10:57 -0700)
committerMatthieu Patou <mat@matws.net>
Sat, 23 Jun 2012 06:22:03 +0000 (23:22 -0700)
source4/dsdb/samdb/ldb_modules/extended_dn_in.c

index 72acf071921a32c577c527c867ef843c538705c0..c21a1ea69bc0edb40facff48fcad71a034f4af13 100644 (file)
@@ -360,6 +360,10 @@ static int extended_dn_filter_callback(struct ldb_parse_tree *tree, void *privat
                return LDB_SUCCESS;
        }
 
+       if (!filter_ctx->schema) {
+               /* Schema not setup yet */
+               return LDB_SUCCESS;
+       }
        attribute = dsdb_attribute_by_lDAPDisplayName(filter_ctx->schema, tree->u.equality.attr);
        if (attribute == NULL) {
                return LDB_SUCCESS;