nss-pam-ldapd commit: r1630 - in nss-pam-ldapd-0.7: . nslcd
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1630 - in nss-pam-ldapd-0.7: . nslcd
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1630 - in nss-pam-ldapd-0.7: . nslcd
- Date: Sat, 10 Mar 2012 21:31:59 +0100 (CET)
Author: arthur
Date: Sat Mar 10 21:31:58 2012
New Revision: 1630
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1630&view=revision
Log:
properly log failures to lookup DNS SRV records (r1569 from 0.8 branch)
Modified:
nss-pam-ldapd-0.7/ (props changed)
nss-pam-ldapd-0.7/nslcd/cfg.c
Modified: nss-pam-ldapd-0.7/nslcd/cfg.c
==============================================================================
--- nss-pam-ldapd-0.7/nslcd/cfg.c Sat Mar 10 21:24:02 2012 (r1629)
+++ nss-pam-ldapd-0.7/nslcd/cfg.c Sat Mar 10 21:31:58 2012 (r1630)
@@ -219,13 +219,18 @@
static void add_uris_from_dns(const char *filename,int lnr,
struct ldap_config *cfg)
{
- int ret=0;
+ int rc;
char *domain;
char *hostlist=NULL,*nxt;
char buf[HOST_NAME_MAX+sizeof("ldap://")];
domain=cfg_getdomainname(filename,lnr);
- ret=ldap_domain2hostlist(domain,&hostlist);
- /* FIXME: have better error handling */
+ rc=ldap_domain2hostlist(domain,&hostlist);
+ if (rc!=LDAP_SUCCESS)
+ {
+ log_log(LOG_ERR,"%s:%d: no servers found in DNS zone %s: %s",
+ filename,lnr,domain,ldap_err2string(rc));
+ exit(EXIT_FAILURE);
+ }
if ((hostlist==NULL)||(*hostlist=='\0'))
{
log_log(LOG_ERR,"%s:%d: no servers found in DNS zone
%s",filename,lnr,domain);
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd commit: r1630 - in nss-pam-ldapd-0.7: . nslcd,
Commits of the nss-pam-ldapd project