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

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