Blame SOURCES/autofs-5.1.1-fix-update_hosts_mounts-return.patch

019928
autofs-5.1.1 - fix update_hosts_mounts() return
019928
019928
From: Ian Kent <raven@themaw.net>
019928
019928
The return of update_hosts_mounts() isn't used so set it to void type
019928
and log a warning if the map entry fails the parse.
019928
019928
Signed-off-by: Ian Kent <raven@themaw.net>
019928
---
019928
 CHANGELOG              |    1 +
019928
 modules/lookup_hosts.c |   11 ++++++-----
019928
 2 files changed, 7 insertions(+), 5 deletions(-)
019928
019928
--- autofs-5.0.7.orig/CHANGELOG
019928
+++ autofs-5.0.7/CHANGELOG
019928
@@ -194,6 +194,7 @@
019928
 - fix error handling on ldap bind fail.
019928
 - fix gcc5 complaints.
019928
 - fix missing source sss in multi map lookup.
019928
+- fix update_hosts_mounts() return.
019928
 
019928
 25/07/2012 autofs-5.0.7
019928
 =======================
019928
--- autofs-5.0.7.orig/modules/lookup_hosts.c
019928
+++ autofs-5.0.7/modules/lookup_hosts.c
019928
@@ -162,9 +162,9 @@ static int do_parse_mount(struct autofs_
019928
 	return NSS_STATUS_SUCCESS;
019928
 }
019928
 
019928
-static int update_hosts_mounts(struct autofs_point *ap,
019928
-			       struct map_source *source, time_t age,
019928
-			       struct lookup_context *ctxt)
019928
+static void update_hosts_mounts(struct autofs_point *ap,
019928
+				struct map_source *source, time_t age,
019928
+				struct lookup_context *ctxt)
019928
 {
019928
 	struct mapent_cache *mc;
019928
 	struct mapent *me;
019928
@@ -212,13 +212,14 @@ next:
019928
 		ap->flags |= MOUNT_FLAG_REMOUNT;
019928
 		ret = ctxt->parse->parse_mount(ap, me->key, strlen(me->key),
019928
 					       me->mapent, ctxt->parse->context);
019928
+		if (ret)
019928
+			warn(ap->logopt, MODPREFIX
019928
+			     "failed to parse mount %s", me->mapent);
019928
 		ap->flags &= ~MOUNT_FLAG_REMOUNT;
019928
 cont:
019928
 		me = cache_lookup_next(mc, me);
019928
 	}
019928
 	pthread_cleanup_pop(1);
019928
-
019928
-	return NSS_STATUS_SUCCESS;
019928
 }
019928
 
019928
 int lookup_read_map(struct autofs_point *ap, time_t age, void *context)