summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/ejs/smbcalls_ldb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/scripting/ejs/smbcalls_ldb.c b/source4/scripting/ejs/smbcalls_ldb.c
index 709ed27e5e..7c81b8c826 100644
--- a/source4/scripting/ejs/smbcalls_ldb.c
+++ b/source4/scripting/ejs/smbcalls_ldb.c
@@ -26,6 +26,7 @@
#include "lib/appweb/ejs/ejs.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
+#include "lib/cmdline/popt_common.h"
/*
get the connected db
@@ -370,6 +371,9 @@ static int ejs_ldbConnect(MprVarHandle eid, int argc, char **argv)
session_info = mprGetThisPtr(eid, "session_info");
creds = mprGetThisPtr(eid, "credentials");
+ if (creds == NULL) {
+ creds = cmdline_credentials;
+ }
dbfile = argv[0];