summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-12-18 22:27:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:29 -0500
commit4ee24ce2ba9755184d516bd47d73b296a4640f3c (patch)
treed1c77c7317c3d1b2ca686837b96104aa2fd4d117
parentac3f676f62f7a09339abfb7bb8e6790040d1551b (diff)
downloadsamba-4ee24ce2ba9755184d516bd47d73b296a4640f3c.tar.gz
samba-4ee24ce2ba9755184d516bd47d73b296a4640f3c.tar.bz2
samba-4ee24ce2ba9755184d516bd47d73b296a4640f3c.zip
r12323: fixeed the use of options.get_credentials() for ldb
(This used to be commit b27d81dca9fd07c83b11a5bb3a883ec3f28cca6a)
-rw-r--r--source4/scripting/ejs/smbcalls_ldb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/scripting/ejs/smbcalls_ldb.c b/source4/scripting/ejs/smbcalls_ldb.c
index 7c81b8c826..e9dba94eaa 100644
--- a/source4/scripting/ejs/smbcalls_ldb.c
+++ b/source4/scripting/ejs/smbcalls_ldb.c
@@ -360,6 +360,8 @@ static int ejs_ldbConnect(MprVarHandle eid, int argc, char **argv)
struct ldb_context *ldb;
struct auth_session_info *session_info;
struct cli_credentials *creds;
+ struct MprVar *credentials;
+ struct MprVar *this = mprGetProperty(ejsGetLocalObject(eid), "this", 0);
const char *dbfile;
@@ -370,8 +372,10 @@ static int ejs_ldbConnect(MprVarHandle eid, int argc, char **argv)
session_info = mprGetThisPtr(eid, "session_info");
- creds = mprGetThisPtr(eid, "credentials");
- if (creds == NULL) {
+ credentials = mprGetProperty(this, "credentials", NULL);
+ if (credentials) {
+ creds = mprGetPtr(credentials, "creds");
+ } else {
creds = cmdline_credentials;
}