Date: Thu, 25 Sep 2014 17:28:30 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272116 - stable/10/sys/fs/autofs Message-ID: <201409251728.s8PHSU0W091692@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Thu Sep 25 17:28:29 2014 New Revision: 272116 URL: http://svnweb.freebsd.org/changeset/base/272116 Log: 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 Modified: stable/10/sys/fs/autofs/autofs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vnops.c Thu Sep 25 16:48:23 2014 (r272115) +++ stable/10/sys/fs/autofs/autofs_vnops.c Thu Sep 25 17:28:29 2014 (r272116) @@ -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?201409251728.s8PHSU0W091692>