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

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