Date: Tue, 23 Sep 2014 11:27:44 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272025 - head/sys/fs/autofs Message-ID: <201409231127.s8NBRijI027327@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Tue Sep 23 11:27:43 2014 New Revision: 272025 URL: http://svnweb.freebsd.org/changeset/base/272025 Log: 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 Modified: head/sys/fs/autofs/autofs_vnops.c Modified: head/sys/fs/autofs/autofs_vnops.c ============================================================================== --- head/sys/fs/autofs/autofs_vnops.c Tue Sep 23 10:56:42 2014 (r272024) +++ head/sys/fs/autofs/autofs_vnops.c Tue Sep 23 11:27:43 2014 (r272025) @@ -544,6 +544,8 @@ autofs_node_find(struct autofs_node *par 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 {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409231127.s8NBRijI027327>