[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
Wed Mar 10 19:32:17 UTC 2021


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

--- Comment #33 from Martin Birgmeier <d8zNeCFG at aon.at> ---
Hello Robert,

Please excuse me - I currently do not have the time to test this (but I am
still happily running your previous patches :-)). I have briefly looked at the
patch and assume it will be working. It appears like quite a sledgehammer
method, first because it seems to nondiscriminatorely unmount everything, and
second because it still uses an exec (popen).

I believe it would be better to build a small library for dealing with the
interaction of NFS mounts and maintaining the mounttab (and probably also the
mountdtab on the server) file and call that from both the automounter and
rpc.umntall etc. That library should also take care of possibly simultaneous
accesses to these files and properly lock/unlock them so that they cannot get
corrupted while they are being updated/in use. Finally, this library should
also take care of counting any possible mounts - one and the same NFS client
might (and in my case, does) mount the same export twice in different places,
and this must be properly handled in both mounttab and mountdtab.

Best regards,

Martin

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


More information about the freebsd-bugs mailing list