1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

handle ldap server down better

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 7d94f1b736
commit 0d85815c99

View File

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