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

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