1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-30 08:23:49 +03:00

r12323: fixeed the use of options.get_credentials() for ldb

This commit is contained in:
Andrew Tridgell
2005-12-18 22:27:26 +00:00
committed by Gerald (Jerry) Carter
parent de8975bdd3
commit b27d81dca9

View File

@@ -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;
}