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