[PATCH 11/32] autofs-5.1.5 - also use strictexpire for offsets

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

 



Map entries with offsets should use the "strictexpire" option when
mounting offsets if the option is set for the owner mount.

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 b72711cb..9bb5343d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -17,6 +17,7 @@ xx/xx/2019 autofs-5.1.6
 - fix additional typing errors.
 - update autofs(8) offset map entry update description.
 - increase group buffer size geometrically.
+- also use strictexpire for offsets.
 
 30/10/2018 autofs-5.1.5
 - fix flag file permission.
diff --git a/daemon/direct.c b/daemon/direct.c
index ad540b08..1c7a9a5c 100644
--- a/daemon/direct.c
+++ b/daemon/direct.c
@@ -753,6 +753,16 @@ int mount_autofs_offset(struct autofs_point *ap, struct mapent *me, const char *
 		mp->options = make_options_string(ap->path, ap->kpipefd, str_offset);
 		if (!mp->options)
 			return MOUNT_OFFSET_OK;
+
+		if ((ap->flags & MOUNT_FLAG_STRICTEXPIRE) &&
+		    ((get_kver_major() == 5 && get_kver_minor() > 3) ||
+		     (get_kver_major() > 5))) {
+			char *tmp = realloc(mp->options, strlen(mp->options) + 12);
+			if (tmp) {
+				strcat(tmp, ",strictexpire");
+				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