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

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