1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-26 01:49:31 +03:00

r12324: use command line credentials if available in ldap.js

(This used to be commit f4f99f9af3)
This commit is contained in:
Andrew Tridgell
2005-12-18 22:28:12 +00:00
committed by Gerald (Jerry) Carter
parent 4ee24ce2ba
commit ddbeaa2f65

View File

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