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

8fa62f
autofs-5.1.5 - use ignore option for offset mounts as well
8fa62f
8fa62f
From: Ian Kent <raven@themaw.net>
8fa62f
8fa62f
The pseudo option "ignore" (that's used as a hint that applications
8fa62f
should ignore this mount when reporting a list of mounts) has been
8fa62f
added to direct and indirect mounts but hasn't been added to offset
8fa62f
mounts.
8fa62f
8fa62f
Signed-off-by: Ian Kent <raven@themaw.net>
8fa62f
---
8fa62f
 CHANGELOG       |    1 +
8fa62f
 daemon/direct.c |   10 ++++++++++
8fa62f
 2 files changed, 11 insertions(+)
8fa62f
8fa62f
--- autofs-5.1.4.orig/CHANGELOG
8fa62f
+++ autofs-5.1.4/CHANGELOG
8fa62f
@@ -61,6 +61,7 @@ xx/xx/2018 autofs-5.1.5
8fa62f
 - fix amd entry memory leak.
8fa62f
 - fix unlink_mount_tree() not umounting mounts.
8fa62f
 - add ignore mount option.
8fa62f
+- use ignore option for offset mounts as well.
8fa62f
 
8fa62f
 19/12/2017 autofs-5.1.4
8fa62f
 - fix spec file url.
8fa62f
--- autofs-5.1.4.orig/daemon/direct.c
8fa62f
+++ autofs-5.1.4/daemon/direct.c
8fa62f
@@ -756,6 +756,16 @@ int mount_autofs_offset(struct autofs_po
8fa62f
 				mp->options = tmp;
8fa62f
 			}
8fa62f
 		}
8fa62f
+
8fa62f
+		if ((ap->flags & MOUNT_FLAG_IGNORE) &&
8fa62f
+		    ((get_kver_major() == 5 && get_kver_minor() > 4) ||
8fa62f
+		     (get_kver_major() > 5))) {
8fa62f
+			char *tmp = realloc(mp->options, strlen(mp->options) + 7);
8fa62f
+			if (tmp) {
8fa62f
+				strcat(tmp, ",ignore");
8fa62f
+				mp->options = tmp;
8fa62f
+			}
8fa62f
+		}
8fa62f
 	}
8fa62f
 
8fa62f
 	strcpy(mountpoint, root);