summaryrefslogtreecommitdiffstats
path: root/testprogs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-12-18 22:28:12 +0000
committerAndrew Tridgell <tridge@samba.org>2005-12-18 22:28:12 +0000
commit6e3cbcb25b59b17c3a18cdf949d0183eabeb7a1e (patch)
tree88d9edbd94b6a95cecee52070a360c277a51c3a0 /testprogs
parentb6782249d936e320853b7f2d9556854be8086a35 (diff)
downloadsamba-6e3cbcb25b59b17c3a18cdf949d0183eabeb7a1e.tar.gz
samba-6e3cbcb25b59b17c3a18cdf949d0183eabeb7a1e.tar.xz
samba-6e3cbcb25b59b17c3a18cdf949d0183eabeb7a1e.zip
r12324: use command line credentials if available in ldap.js
Diffstat (limited to 'testprogs')
-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 e1099d5ff0c..561d5d86f88 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;