diff options
author | Simo Sorce <idra@samba.org> | 2005-06-06 15:19:49 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2005-06-06 15:19:49 +0000 |
commit | 09aa8a385bb764852cfade3b7934ba199366ca8c (patch) | |
tree | b1a5fe346d4b1a800533b1b050f6b2fd8a2634a9 /source/lib | |
parent | 19399089ff6e2071c6930e0071eed5f5fb5de2dd (diff) | |
download | samba-09aa8a385bb764852cfade3b7934ba199366ca8c.tar.gz samba-09aa8a385bb764852cfade3b7934ba199366ca8c.tar.xz samba-09aa8a385bb764852cfade3b7934ba199366ca8c.zip |
r7343: handle url like ldb_tdb does
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c b/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c index 602bd05fa2c..9ed137c4f54 100644 --- a/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c +++ b/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c @@ -903,11 +903,16 @@ lsqlite3_initialize(struct lsqlite3_private *lsqlite3, ; /* Skip protocol indicator of url */ - if ((p = strchr(url, ':')) == NULL) { - return SQLITE_MISUSE; - } else { - ++p; - } + if (strchr(url, ':')) { + if (strncmp(url, "sqlite://", 9) != 0) { + errno = EINVAL; + return SQLITE_MISUSE; + } + p = url + 9; + } else { + p = url; + } + /* * See if we'll be creating a new database, or opening an existing one |