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

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