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

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