From ddbeaa2f65933a74526ec49aa074c9b662d8beb1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 18 Dec 2005 22:28:12 +0000 Subject: r12324: use command line credentials if available in ldap.js (This used to be commit f4f99f9af33699ac8fe43b09fa7542aab72a031a) --- testprogs/ejs/ldap.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'testprogs/ejs') 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 "); 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; -- cgit