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

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