summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2014-09-25 17:28:29 +0000
committertrasz <trasz@FreeBSD.org>2014-09-25 17:28:29 +0000
commit22dfed7064487deae700710bd4b232b1c484093a (patch)
treef461c9b40d7e495ead528f897dd8b39626d7fdf2 /sys/fs
parentb5e5f060ae94dd1d58a917c0b3c396f466e2079a (diff)
downloadFreeBSD-src-22dfed7064487deae700710bd4b232b1c484093a.zip
FreeBSD-src-22dfed7064487deae700710bd4b232b1c484093a.tar.gz
MFC r272025:
Fix thinko that, with two map entries like shown below, in that order, made autofs mix them up: the second one wasn't visible in ls(1) output, and trying to access it would trigger mount for the first one. foobar host:/foobar foo host:/foo Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/autofs/autofs_vnops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/autofs/autofs_vnops.c b/sys/fs/autofs/autofs_vnops.c
index e0a75fa..392c253 100644
--- a/sys/fs/autofs/autofs_vnops.c
+++ b/sys/fs/autofs/autofs_vnops.c
@@ -544,6 +544,8 @@ autofs_node_find(struct autofs_node *parent, const char *name,
TAILQ_FOREACH(anp, &parent->an_children, an_next) {
if (namelen >= 0) {
+ if (strlen(anp->an_name) != namelen)
+ continue;
if (strncmp(anp->an_name, name, namelen) != 0)
continue;
} else {
OpenPOWER on IntegriCloud