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

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