Blame SOURCES/autofs-5.1.0-beta1-fix-ldap_uri-config-update.patch

4d476f
autofs-5.1.0-beta1 - fix ldap_uri config update
4d476f
4d476f
From: Ian Kent <raven@themaw.net>
4d476f
4d476f
Fix some errors in ldap get uris and get search dns.
4d476f
---
4d476f
 CHANGELOG      |    1 +
4d476f
 lib/defaults.c |   11 +++++------
4d476f
 2 files changed, 6 insertions(+), 6 deletions(-)
4d476f
4d476f
--- autofs-5.0.7.orig/CHANGELOG
4d476f
+++ autofs-5.0.7/CHANGELOG
4d476f
@@ -118,6 +118,7 @@
4d476f
 - fix xfn sets incorrect lexer state.
4d476f
 - fix old style key lookup.
4d476f
 - fix expire when server not responding.
4d476f
+- fix ldap_uri config update.
4d476f
 
4d476f
 25/07/2012 autofs-5.0.7
4d476f
 =======================
4d476f
--- autofs-5.0.7.orig/lib/defaults.c
4d476f
+++ autofs-5.0.7/lib/defaults.c
4d476f
@@ -1100,19 +1100,18 @@ struct list_head *defaults_get_uris(void
4d476f
 	struct list_head *list;
4d476f
 
4d476f
 	list = malloc(sizeof(struct list_head));
4d476f
-	if (!list) {
4d476f
+	if (!list)
4d476f
 		return NULL;
4d476f
-	}
4d476f
 	INIT_LIST_HEAD(list);
4d476f
 
4d476f
-	if (defaults_read_config(0)) {
4d476f
+	if (!defaults_read_config(0)) {
4d476f
 		free(list);
4d476f
 		return NULL;
4d476f
 	}
4d476f
 
4d476f
 	pthread_mutex_lock(&conf_mutex);
4d476f
 	co = conf_lookup(autofs_gbl_sec, NAME_LDAP_URI);
4d476f
-	if (!co || !co->value) {
4d476f
+	if (!co) {
4d476f
 		pthread_mutex_unlock(&conf_mutex);
4d476f
 		free(list);
4d476f
 		return NULL;
4d476f
@@ -1233,12 +1232,12 @@ struct ldap_searchdn *defaults_get_searc
4d476f
 	struct conf_option *co;
4d476f
 	struct ldap_searchdn *sdn, *last;
4d476f
 
4d476f
-	if (defaults_read_config(0))
4d476f
+	if (!defaults_read_config(0))
4d476f
 		return NULL;
4d476f
 
4d476f
 	pthread_mutex_lock(&conf_mutex);
4d476f
 	co = conf_lookup(autofs_gbl_sec, NAME_SEARCH_BASE);
4d476f
-	if (!co || !co->value) {
4d476f
+	if (!co) {
4d476f
 		pthread_mutex_unlock(&conf_mutex);
4d476f
 		return NULL;
4d476f
 	}