diff options
-rwxr-xr-x | testprogs/ejs/ldap.js | 7 |
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; |