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

9c59ce
autofs-5.1.5 - also use strictexpire for offsets
9c59ce
9c59ce
From: Ian Kent <raven@themaw.net>
9c59ce
9c59ce
Map entries with offsets should use the "strictexpire" option when
9c59ce
mounting offsets if the option is set for the owner mount.
9c59ce
9c59ce
Signed-off-by: Ian Kent <raven@themaw.net>
9c59ce
---
9c59ce
 CHANGELOG       |    1 +
9c59ce
 daemon/direct.c |   10 ++++++++++
9c59ce
 2 files changed, 11 insertions(+)
9c59ce
9c59ce
--- autofs-5.0.7.orig/CHANGELOG
9c59ce
+++ autofs-5.0.7/CHANGELOG
9c59ce
@@ -350,6 +350,7 @@
9c59ce
 - use local getmntent_r() in get_mnt_list().
9c59ce
 - use local getmntent_r() in tree_make_mnt_list().
9c59ce
 - fix missing initialization of autofs_point flags.
9c59ce
+- also use strictexpire for offsets.
9c59ce
 
9c59ce
 25/07/2012 autofs-5.0.7
9c59ce
 =======================
9c59ce
--- autofs-5.0.7.orig/daemon/direct.c
9c59ce
+++ autofs-5.0.7/daemon/direct.c
9c59ce
@@ -685,6 +685,16 @@ int mount_autofs_offset(struct autofs_po
9c59ce
 		mp->options = make_options_string(ap->path, ap->kpipefd, str_offset);
9c59ce
 		if (!mp->options)
9c59ce
 			return MOUNT_OFFSET_OK;
9c59ce
+
9c59ce
+		if ((ap->flags & MOUNT_FLAG_STRICTEXPIRE) &&
9c59ce
+		    ((get_kver_major() == 5 && get_kver_minor() > 3) ||
9c59ce
+		     (get_kver_major() > 5))) {
9c59ce
+			char *tmp = realloc(mp->options, strlen(mp->options) + 12);
9c59ce
+			if (tmp) {
9c59ce
+				strcat(tmp, ",strictexpire");
9c59ce
+				mp->options = tmp;
9c59ce
+			}
9c59ce
+		}
9c59ce
 	}
9c59ce
 
9c59ce
 	strcpy(mountpoint, root);