[Bug 251906] autofs: automounter always only adds to /var/db/mounttab but never clears it

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jan 5 16:03:07 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251906

--- Comment #13 from Martin Birgmeier <d8zNeCFG at aon.at> ---
It seems that there are further problems with mounttab handling... I am using
chroot to change into different environments, and in each environment the same
automount structure is being used:

#
# $FreeBSD: releng/12.2/usr.sbin/autofs/auto_master 337749 2018-08-14 13:52:08Z
trasz $
#
# Automounter master map, see auto_master(5) for details.
#
/net            -hosts3         -nobrowse,nosuid,intr
# When using the -media special map, make sure to edit devd.conf(5)
# to move the call to "automount -c" out of the comments section.
#/media         -media          -nosuid,noatime,autoro
#/-             -noauto

/z/netboot/920/net   -hosts3 -nobrowse,nosuid,intr

/z/netboot/921/net   -hosts3 -nobrowse,nosuid,intr

(special_hosts3 is an improved version of special_hosts.)

This means that one server directory can well be mounted into multiple
locations on the client.

But in both mounttab and mountdtab, only the host path is added, so that when
unmounting on the client it is not clear how many mounts of the same server
directory are still active.

It seems that the handling of /var/db/mounttab and /var/db/mountdtab need be
thoroughly re-worked, including the client path (or in the case of mountdtab
maybe just a count), and including making it race-free when multiple programs
try to modify these files.

-- Martin

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list