diff options
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_tdb.c | 13 |
1 files changed, 8 insertions, 5 deletions
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) { |