summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-12-18 22:14:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:29 -0500
commitac3f676f62f7a09339abfb7bb8e6790040d1551b (patch)
tree71e34c1332b16acd589eb270c915473761cc0488 /source4/scripting
parent46de306f13ec894c967a93121ac1b0847659cf01 (diff)
downloadsamba-ac3f676f62f7a09339abfb7bb8e6790040d1551b.tar.gz
samba-ac3f676f62f7a09339abfb7bb8e6790040d1551b.tar.bz2
samba-ac3f676f62f7a09339abfb7bb8e6790040d1551b.zip
r12322: automatically use cmdline_credentials if the ldb object doesn't have
its own credentials element (This used to be commit de8975bdd3dc9b4f4d65000e126bbd11c43b3f06)
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];