summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-05 10:14:22 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-05 10:14:22 +0000
commit8aa0a817c1c34b840eb68344a062cdbd95a06a68 (patch)
treef502dc8f95482f83d0b3e545f29cda396baf0513 /source3/libads
parent9421ad4a7a900b219f87754bc20fa14f2f22fd35 (diff)
downloadsamba-8aa0a817c1c34b840eb68344a062cdbd95a06a68.tar.gz
samba-8aa0a817c1c34b840eb68344a062cdbd95a06a68.tar.bz2
samba-8aa0a817c1c34b840eb68344a062cdbd95a06a68.zip
handle ldap server down better
(This used to be commit 0d85815c992c6ca77ba64dfb2d7538be4684654d)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ldap.c4
1 files changed, 3 insertions, 1 deletions
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);
}