diff --git a/nss-pam-ldapd-0.7.x-dnssrv.patch b/nss-pam-ldapd-0.7.x-dnssrv.patch deleted file mode 100644 index 1b874a3..0000000 --- a/nss-pam-ldapd-0.7.x-dnssrv.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -up ./man/nslcd.conf.5.xml.dnssrv ./man/nslcd.conf.5.xml ---- ./man/nslcd.conf.5.xml.dnssrv 2012-04-28 21:22:26.327729809 +0200 -+++ ./man/nslcd.conf.5.xml 2012-04-28 21:22:26.330729794 +0200 -@@ -127,9 +127,14 @@ - LDAP over TCP, - ICP or SSL respectively (if - supported by the LDAP library). -+ -+ - Alternatively, the value DNS may be - used to try to lookup the server using DNS - SRV records. -+ By default the current domain is used but another domain can -+ be queried by using the -+ DNS:DOMAIN syntax. - - - When using the ldapi scheme, %2f should be used to escape slashes -diff -up ./nslcd/cfg.c.dnssrv ./nslcd/cfg.c ---- ./nslcd/cfg.c.dnssrv 2012-04-28 21:22:26.326729814 +0200 -+++ ./nslcd/cfg.c 2012-04-28 21:22:26.330729794 +0200 -@@ -224,13 +224,13 @@ static char *cfg_getdomainname(const cha - - /* add URIs by doing DNS queries for SRV records */ - static void add_uris_from_dns(const char *filename,int lnr, -- struct ldap_config *cfg) -+ struct ldap_config *cfg, -+ char *domain) - { - int rc; -- char *domain; - char *hostlist=NULL,*nxt; - char buf[HOST_NAME_MAX+sizeof("ldap://")]; -- domain=cfg_getdomainname(filename,lnr); -+ log_log(LOG_DEBUG,"query %s for SRV records",domain); - rc=ldap_domain2hostlist(domain,&hostlist); - if (rc!=LDAP_SUCCESS) - { -@@ -848,7 +848,16 @@ static void cfg_read(const char *filenam - if (strcasecmp(token,"dns")==0) - { - #ifdef HAVE_LDAP_DOMAIN2HOSTLIST -- add_uris_from_dns(filename,lnr,cfg); -+ add_uris_from_dns(filename,lnr,cfg,cfg_getdomainname(filename,lnr)); -+#else /* not HAVE_LDAP_DOMAIN2HOSTLIST */ -+ log_log(LOG_ERR,"%s:%d: value %s not supported on platform",filename,lnr,token); -+ exit(EXIT_FAILURE); -+#endif /* not HAVE_LDAP_DOMAIN2HOSTLIST */ -+ } -+ else if (strncasecmp(token,"dns:",4)==0) -+ { -+#ifdef HAVE_LDAP_DOMAIN2HOSTLIST -+ add_uris_from_dns(filename,lnr,cfg,strdup(token+sizeof("dns"))); - #else /* not HAVE_LDAP_DOMAIN2HOSTLIST */ - log_log(LOG_ERR,"%s:%d: value %s not supported on platform",filename,lnr,token); - exit(EXIT_FAILURE); diff --git a/nss-pam-ldapd.spec b/nss-pam-ldapd.spec index 93e16e3..34977c3 100644 --- a/nss-pam-ldapd.spec +++ b/nss-pam-ldapd.spec @@ -25,7 +25,6 @@ Source2: nslcd.init Source3: nslcd.tmpfiles Source4: nslcd.service Patch1: nss-pam-ldapd-0.8.12-validname.patch -Patch2: nss-pam-ldapd-0.7.x-dnssrv.patch Patch3: nss-pam-ldapd-0.7.x-uid-overflow.patch Patch4: nss-pam-ldapd-0.7.x-epipe.patch Patch5: nss-pam-ldapd-0.7.16-skipall.patch @@ -67,7 +66,6 @@ nsswitch module. %prep %setup -q %patch1 -p0 -b .validname -%patch2 -p1 -b .dnssrv %patch3 -p1 -b .overflow %patch4 -p1 -b .epipe %patch5 -p1 -b .skipall