Ian Kent e60215
autofs-5.0.7 - fix spawn_umount() return check in mount_bind.c:lookup_init()
Ian Kent e60215
Ian Kent e60215
From: Ian Kent <raven@themaw.net>
Ian Kent e60215
Ian Kent e60215
Check return of spawn_umount() and report it if it fails.
Ian Kent e60215
---
Ian Kent e60215
 modules/mount_bind.c |    3 ++-
Ian Kent e60215
 1 file changed, 2 insertions(+), 1 deletion(-)
Ian Kent e60215
Ian Kent e60215
diff --git a/modules/mount_bind.c b/modules/mount_bind.c
Ian Kent e60215
index 4975294..d6c6fe7 100644
Ian Kent e60215
--- a/modules/mount_bind.c
Ian Kent e60215
+++ b/modules/mount_bind.c
Ian Kent e60215
@@ -57,7 +57,8 @@ int mount_init(void **context)
Ian Kent e60215
 		bind_works = 1;
Ian Kent e60215
 	}
Ian Kent e60215
 
Ian Kent e60215
-	spawn_umount(LOGOPT_NONE, "-n", t2_dir, NULL);
Ian Kent e60215
+	if (spawn_umount(LOGOPT_NONE, "-n", t2_dir, NULL) != 0)
Ian Kent e60215
+		debug(LOGOPT_ANY, MODPREFIX "umount failed for %s", t2_dir);
Ian Kent e60215
 
Ian Kent e60215
 out:
Ian Kent e60215
 	rmdir(t1_dir);