summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-19 11:54:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:44 -0500
commitda88ef65e0f625e8baab07251839171d0ae5aa1b (patch)
tree72e5ddb047c3b69c7626af495921d642d4f40561 /source4/scripting
parentc1a4f0c769479f0a5a262db6f9d82814bf81d1d3 (diff)
downloadsamba-da88ef65e0f625e8baab07251839171d0ae5aa1b.tar.gz
samba-da88ef65e0f625e8baab07251839171d0ae5aa1b.tar.bz2
samba-da88ef65e0f625e8baab07251839171d0ae5aa1b.zip
r8602: allow options in ldb connect calls
(This used to be commit 4c1d6a97c0c9df2848a16afb1b4eed4b20963bef)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/ejs/smbcalls_ldb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/ejs/smbcalls_ldb.c b/source4/scripting/ejs/smbcalls_ldb.c
index 30d0d354b4..0795db9018 100644
--- a/source4/scripting/ejs/smbcalls_ldb.c
+++ b/source4/scripting/ejs/smbcalls_ldb.c
@@ -259,20 +259,21 @@ static int ejs_ldbModify(MprVarHandle eid, int argc, struct MprVar **argv)
connect to a database
usage:
ok = ldb.connect(dbfile);
+ ok = ldb.connect(dbfile, "modules:modlist");
*/
static int ejs_ldbConnect(MprVarHandle eid, int argc, char **argv)
{
struct ldb_context *ldb;
const char *dbfile;
- if (argc != 1) {
+ if (argc < 1) {
ejsSetErrorMsg(eid, "ldb.connect invalid arguments");
return -1;
}
dbfile = argv[0];
- ldb = ldb_wrap_connect(mprMemCtx(), dbfile, 0, NULL);
+ ldb = ldb_wrap_connect(mprMemCtx(), dbfile, 0, argv+1);
if (ldb == NULL) {
ejsSetErrorMsg(eid, "ldb.connect failed to open %s", dbfile);
}