summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-12-18 22:28:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:29 -0500
commitddbeaa2f65933a74526ec49aa074c9b662d8beb1 (patch)
treecd2f18bcfaa3afb713cf043bf15f870ade799070
parent4ee24ce2ba9755184d516bd47d73b296a4640f3c (diff)
downloadsamba-ddbeaa2f65933a74526ec49aa074c9b662d8beb1.tar.gz
samba-ddbeaa2f65933a74526ec49aa074c9b662d8beb1.tar.bz2
samba-ddbeaa2f65933a74526ec49aa074c9b662d8beb1.zip
r12324: use command line credentials if available in ldap.js
(This used to be commit f4f99f9af33699ac8fe43b09fa7542aab72a031a)
-rwxr-xr-xtestprogs/ejs/ldap.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js
index e1099d5ff0..561d5d86f8 100755
--- a/testprogs/ejs/ldap.js
+++ b/testprogs/ejs/ldap.js
@@ -15,6 +15,8 @@ if (options == undefined) {
return -1;
}
+libinclude("base.js");
+
if (options.ARGV.length != 1) {
println("Usage: ldap.js <HOST>");
return -1;
@@ -57,9 +59,14 @@ function find_basedn(ldb)
return res[0].defaultNamingContext;
}
+/* use command line creds if available */
+ldb.credentials = options.get_credentials();
+
var ok = ldb.connect("ldap://" + host);
var base_dn = find_basedn(ldb);
+printf("baseDN: %s\n", base_dn);
+
basic_tests(ldb, base_dn)
return 0;