summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/common/ldb.c3
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c13
2 files changed, 10 insertions, 6 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index f61ddecdc7..ac77f306e9 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -48,7 +48,8 @@ struct ldb_context *ldb_connect(const char *url, unsigned int flags,
const char *options[])
{
- if (strncmp(url, "tdb:", 4) == 0) {
+ if (strncmp(url, "tdb:", 4) == 0 ||
+ strchr(url, ':') == NULL) {
return ltdb_connect(url, flags, options);
}
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index eb2decfe31..92b88e4fb5 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -607,13 +607,16 @@ struct ldb_context *ltdb_connect(const char *url,
struct ldb_context *ldb;
/* parse the url */
- if (strncmp(url, "tdb://", 6) != 0) {
- errno = EINVAL;
- return NULL;
+ if (strchr(url, ':')) {
+ if (strncmp(url, "tdb://", 6) != 0) {
+ errno = EINVAL;
+ return NULL;
+ }
+ path = url+6;
+ } else {
+ path = url;
}
- path = url+6;
-
tdb_flags = TDB_DEFAULT;
if (flags & LDB_FLG_RDONLY) {