Blame SOURCES/autofs-5.1.5-use-ignore-option-for-offset-mounts-as-well.patch

304803
autofs-5.1.5 - use ignore option for offset mounts as well
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
The pseudo option "ignore" (that's used as a hint that applications
304803
should ignore this mount when reporting a list of mounts) has been
304803
added to direct and indirect mounts but hasn't been added to offset
304803
mounts.
304803
304803
Signed-off-by: Ian Kent <raven@themaw.net>
304803
---
304803
 CHANGELOG       |    1 +
304803
 daemon/direct.c |   10 ++++++++++
304803
 2 files changed, 11 insertions(+)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -335,6 +335,7 @@
304803
 - fix amd entry memory leak.
304803
 - fix unlink_mount_tree() not umounting mounts.
304803
 - add ignore mount option.
304803
+- use ignore option for offset mounts as well.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
--- autofs-5.0.7.orig/daemon/direct.c
304803
+++ autofs-5.0.7/daemon/direct.c
304803
@@ -433,6 +433,16 @@ int do_mount_autofs_direct(struct autofs
304803
 				mp->options = tmp;
304803
 			}
304803
 		}
304803
+
304803
+		if ((ap->flags & MOUNT_FLAG_IGNORE) &&
304803
+		    ((get_kver_major() == 5 && get_kver_minor() > 4) ||
304803
+		     (get_kver_major() > 5))) {
304803
+			char *tmp = realloc(mp->options, strlen(mp->options) + 7);
304803
+			if (tmp) {
304803
+				strcat(tmp, ",ignore");
304803
+				mp->options = tmp;
304803
+			}
304803
+		}
304803
 	}
304803
 
304803
 	/* In case the directory doesn't exist, try to mkdir it */