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

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