diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-12-18 22:27:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:29 -0500 |
commit | 4ee24ce2ba9755184d516bd47d73b296a4640f3c (patch) | |
tree | d1c77c7317c3d1b2ca686837b96104aa2fd4d117 /source4/scripting/ejs | |
parent | ac3f676f62f7a09339abfb7bb8e6790040d1551b (diff) | |
download | samba-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)
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r-- | source4/scripting/ejs/smbcalls_ldb.c | 8 |
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; } |