Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jul 2023 17:52:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 272446] automount -c clobbers flags of mounted direct map entries
Message-ID:  <bug-272446-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272446

            Bug ID: 272446
           Summary: automount -c clobbers flags of mounted direct map
                    entries
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: andrew@tao11.riddles.org.uk

If you try and enable both the -media and -noauto maps from the sample
auto_master, and enable use of automount -c from devd as suggested in the
comments, then on every devd event, the flags of all the -noauto filesystems
are reset (clearing the "automounted" flag and, more critically, flags such=
 as
"readonly" and "nosuid").

This happens because when traversing the mount list, there are two entries =
for
each -noauto map entry that is currently active: the autofs filesystem itse=
lf,
and the real filesystem mounted on top of it. The automount program sees the
first of those, and issues the equivalent of "mount -u /path" on it, WITHOUT
checking whether "/path" is currently mounted over.

This can be partially fixed in the userland code, but that obviously leaves=
 a
race condition. Accordingly the attached review includes both a kernel and a
userland change: the kernel change is to require that the fstype field pass=
ed
to nmount does actually match the VFS type of the filesystem to be updated.

https://reviews.freebsd.org/D40961

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-272446-227>