diff options
author | trasz <trasz@FreeBSD.org> | 2014-09-23 11:27:43 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2014-09-23 11:27:43 +0000 |
commit | 49648b28cfa88cd995a1ba9a8d50eb4af92c08a7 (patch) | |
tree | 86d3433977c12223816b2c81fb7896bcccd7dd27 /sys/fs/autofs | |
parent | a54263628c21f835529e44fc8de947e377b68ef9 (diff) | |
download | FreeBSD-src-49648b28cfa88cd995a1ba9a8d50eb4af92c08a7.zip FreeBSD-src-49648b28cfa88cd995a1ba9a8d50eb4af92c08a7.tar.gz |
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
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/fs/autofs')
-rw-r--r-- | sys/fs/autofs/autofs_vnops.c | 2 |
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 { |