const char *options[])
{
- if (strncmp(url, "tdb:", 4) == 0) {
+ if (strncmp(url, "tdb:", 4) == 0 ||
+ strchr(url, ':') == NULL) {
return ltdb_connect(url, flags, options);
}
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) {