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

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