Blame SOURCES/autofs-5.0.8-check-for-existing-offset-mount-before-mounting.patch

6bbd11
autofs-5.0.8 - check for existing offset mount before mounting
6bbd11
6bbd11
From: Ian Kent <raven@themaw.net>
6bbd11
6bbd11
The change that introduced the miscellaneous device for autofs
6bbd11
mount control removed a mount point mounted check from the
6bbd11
mount_autofs_offset() function for when the miscellaneous
6bbd11
device is not used.
6bbd11
6bbd11
But a subsequent change that enabled limited update of the exports
6bbd11
of a hosts mount needed that check. Without it a second occurance
6bbd11
of the offset (corresponding to an export) could be mounted upon
6bbd11
a map re-read.
6bbd11
---
6bbd11
 CHANGELOG       |    1 +
6bbd11
 daemon/direct.c |    3 +--
6bbd11
 2 files changed, 2 insertions(+), 2 deletions(-)
6bbd11
6bbd11
--- autofs-5.0.7.orig/CHANGELOG
6bbd11
+++ autofs-5.0.7/CHANGELOG
6bbd11
@@ -80,6 +80,7 @@
6bbd11
 - add short host name standard marco variable.
6bbd11
 - fix symlink fail message in mount_bind.c.
6bbd11
 - add std vars to program map invocation.
6bbd11
+- check for existing offset mount before mounting.
6bbd11
 
6bbd11
 25/07/2012 autofs-5.0.7
6bbd11
 =======================
6bbd11
--- autofs-5.0.7.orig/daemon/direct.c
6bbd11
+++ autofs-5.0.7/daemon/direct.c
6bbd11
@@ -671,14 +671,13 @@ int mount_autofs_offset(struct autofs_po
6bbd11
 		if (!(ret == -1 && errno == ENOENT))
6bbd11
 			return MOUNT_OFFSET_FAIL;
6bbd11
 	} else {
6bbd11
-/*
6bbd11
 		if (is_mounted(_PROC_MOUNTS, me->key, MNTS_AUTOFS)) {
6bbd11
 			if (ap->state != ST_READMAP)
6bbd11
 				warn(ap->logopt,
6bbd11
 				     "trigger %s already mounted", me->key);
6bbd11
 			return MOUNT_OFFSET_OK;
6bbd11
 		}
6bbd11
-*/
6bbd11
+
6bbd11
 		if (me->ioctlfd != -1) {
6bbd11
 			error(ap->logopt, "active offset mount %s", me->key);
6bbd11
 			return MOUNT_OFFSET_FAIL;