[PATCH 17/32] autofs-5.1.5 - use ignore option for offset mounts as well

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The pseudo option "ignore" (that's used as a hint that applications
should ignore this mount when reporting a list of mounts) has been
added to direct and indirect mounts but hasn't been added to offset
mounts.

Signed-off-by: Ian Kent <raven@xxxxxxxxxx>
---
 CHANGELOG       |    1 +
 daemon/direct.c |   10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/CHANGELOG b/CHANGELOG
index 5c255756..9266eca9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -23,6 +23,7 @@ xx/xx/2019 autofs-5.1.6
 - remove a couple of old debug messages.
 - fix amd entry memory leak.
 - fix unlink_mount_tree() not umounting mounts.
+- use ignore option for offset mounts as well.
 
 30/10/2018 autofs-5.1.5
 - fix flag file permission.
diff --git a/daemon/direct.c b/daemon/direct.c
index 5b532a53..a11801be 100644
--- a/daemon/direct.c
+++ b/daemon/direct.c
@@ -756,6 +756,16 @@ int mount_autofs_offset(struct autofs_point *ap, struct mapent *me, const char *
 				mp->options = tmp;
 			}
 		}
+
+		if ((ap->flags & MOUNT_FLAG_IGNORE) &&
+		    ((get_kver_major() == 5 && get_kver_minor() > 4) ||
+		     (get_kver_major() > 5))) {
+			char *tmp = realloc(mp->options, strlen(mp->options) + 7);
+			if (tmp) {
+				strcat(tmp, ",ignore");
+				mp->options = tmp;
+			}
+		}
 	}
 
 	strcpy(mountpoint, root);




[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux