Index: lib/ldb/common/ldb.c =================================================================== --- lib/ldb/common/ldb.c (revision 24649) +++ lib/ldb/common/ldb.c (working copy) @@ -115,7 +115,7 @@ char *backend; ldb_connect_fn fn; - if (strchr(url, ':') != NULL) { + if ((url) && (strchr(url, ':') != NULL)) { backend = talloc_strndup(ldb, url, strchr(url, ':')-url); } else { /* Default to tdb */ Index: lib/ldb/ldb_tdb/ldb_tdb.c =================================================================== --- lib/ldb/ldb_tdb/ldb_tdb.c (revision 24649) +++ lib/ldb/ldb_tdb/ldb_tdb.c (working copy) @@ -1010,8 +1010,8 @@ struct ltdb_private *ltdb; /* parse the url */ - if (strchr(url, ':')) { - if (strncmp(url, "tdb://", 6) != 0) { + if ((!url) || (strchr(url, ':'))) { + if ((!url) || (strncmp(url, "tdb://", 6) != 0)) { ldb_debug(ldb, LDB_DEBUG_ERROR, "Invalid tdb URL '%s'", url); return -1; } Index: dsdb/samdb/ldb_modules/partition.c =================================================================== --- dsdb/samdb/ldb_modules/partition.c (revision 24649) +++ dsdb/samdb/ldb_modules/partition.c (working copy) @@ -724,7 +724,7 @@ p[0] = '\0'; } else { talloc_free(path); - return NULL; + path = talloc_asprintf(mem_ctx, "%s", "."); } full_name = talloc_asprintf(mem_ctx, "%s/%s", path, name); talloc_free(path);