Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F116019097
D40961.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
928 B
Referenced Files
None
Subscribers
None
D40961.diff
View Options
diff --git a/usr.sbin/autofs/automount.c b/usr.sbin/autofs/automount.c
--- a/usr.sbin/autofs/automount.c
+++ b/usr.sbin/autofs/automount.c
@@ -260,6 +260,7 @@
flush_caches(void)
{
struct statfs *mntbuf;
+ struct statfs statbuf;
int i, nitems;
nitems = getmntinfo(&mntbuf, MNT_WAIT);
@@ -274,6 +275,21 @@
mntbuf[i].f_mntonname);
continue;
}
+ /*
+ * A direct map mountpoint may have been mounted over, in
+ * which case we can't MNT_UPDATE it. There's an obvious race
+ * condition remaining here, but that has to be fixed in the
+ * kernel.
+ */
+ if (statfs(mntbuf[i].f_mntonname, &statbuf) != 0) {
+ log_err(1, "cannot statfs %s", mntbuf[i].f_mntonname);
+ continue;
+ }
+ if (strcmp(statbuf.f_fstypename, "autofs") != 0) {
+ log_debugx("skipping %s, filesystem type is not autofs",
+ mntbuf[i].f_mntonname);
+ continue;
+ }
flush_autofs(mntbuf[i].f_mntonname);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 2, 4:51 PM (17 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17908303
Default Alt Text
D40961.diff (928 B)
Attached To
Mode
D40961: Fix for automount -c inappropriately clearing important mount flags
Attached
Detach File
Event Timeline
Log In to Comment