diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-12-05 10:14:22 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-12-05 10:14:22 +0000 |
commit | 8aa0a817c1c34b840eb68344a062cdbd95a06a68 (patch) | |
tree | f502dc8f95482f83d0b3e545f29cda396baf0513 /source3/libads/ldap.c | |
parent | 9421ad4a7a900b219f87754bc20fa14f2f22fd35 (diff) | |
download | samba-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/ldap.c')
-rw-r--r-- | source3/libads/ldap.c | 4 |
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); } |