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(-) diff --git a/CHANGELOG b/CHANGELOG index f9e14b1..839c1ea 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -18,6 +18,7 @@ - fix deadlock in init_ldap_connection. - fix options compare. - fix negative status being reset on map read. +- check for existing offset mount before mounting. 17/10/2013 autofs-5.0.8 ======================= diff --git a/daemon/direct.c b/daemon/direct.c index f85e1b5..3f10846 100644 --- a/daemon/direct.c +++ b/daemon/direct.c @@ -671,14 +671,13 @@ int mount_autofs_offset(struct autofs_point *ap, struct mapent *me, const char * 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;