From 8aa0a817c1c34b840eb68344a062cdbd95a06a68 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Dec 2001 10:14:22 +0000 Subject: handle ldap server down better (This used to be commit 0d85815c992c6ca77ba64dfb2d7538be4684654d) --- source3/libads/ldap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/libads') diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 287ea225a1..bfa5bbd9df 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -66,11 +66,13 @@ int ads_connect(ADS_STRUCT *ads) ads->ld = ldap_open(ads->ldap_server, ads->ldap_port); if (!ads->ld) { - return errno; + return LDAP_SERVER_DOWN; } ldap_set_option(ads->ld, LDAP_OPT_PROTOCOL_VERSION, &version); if (ads->password) { + /* the machine acct password might have changed */ + ads->password = secrets_fetch_machine_password(); kerberos_kinit_password(ads); } -- cgit