Blame SOURCES/autofs-5.0.7-fix-spawn_umount-return-check-in-mount_bind-lookup_init.patch

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