Blame SOURCES/autofs-5.1.5-also-use-strictexpire-for-offsets.patch

8fa62f
autofs-5.1.5 - also use strictexpire for offsets
8fa62f
8fa62f
From: Ian Kent <raven@themaw.net>
8fa62f
8fa62f
Map entries with offsets should use the "strictexpire" option when
8fa62f
mounting offsets if the option is set for the owner mount.
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
@@ -53,6 +53,7 @@ xx/xx/2018 autofs-5.1.5
8fa62f
 - make expire remaining log level debug.
8fa62f
 - allow period following macro in selector value.
8fa62f
 - fix macro expansion in selector values.
8fa62f
+- also use strictexpire for offsets.
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
@@ -743,6 +743,16 @@ int mount_autofs_offset(struct autofs_po
8fa62f
 		mp->options = make_options_string(ap->path, ap->kpipefd, str_offset);
8fa62f
 		if (!mp->options)
8fa62f
 			return MOUNT_OFFSET_OK;
8fa62f
+
8fa62f
+		if ((ap->flags & MOUNT_FLAG_STRICTEXPIRE) &&
8fa62f
+		    ((get_kver_major() == 5 && get_kver_minor() > 3) ||
8fa62f
+		     (get_kver_major() > 5))) {
8fa62f
+			char *tmp = realloc(mp->options, strlen(mp->options) + 12);
8fa62f
+			if (tmp) {
8fa62f
+				strcat(tmp, ",strictexpire");
8fa62f
+				mp->options = tmp;
8fa62f
+			}
8fa62f
+		}
8fa62f
 	}
8fa62f
 
8fa62f
 	strcpy(mountpoint, root);