Date: Tue, 19 Sep 1995 21:40:42 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: peter@taronga.com (Peter da Silva) Cc: terry@lambert.org, peter@taronga.com, hackers@FreeBSD.ORG Subject: Re: Policy on printf format specifiers? Message-ID: <199509200440.VAA13737@phaeton.artisoft.com> In-Reply-To: <199509200120.UAA13405@bonkers.taronga.com> from "Peter da Silva" at Sep 19, 95 08:20:33 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > If you consider reducing the MAXPATHNAME by one for every expansion, > > then yes, I suppose it does. > > Why does NAMEI need to expand anything? Symbolic links replacing path components that are not the terminal path component get expanded into the cn_pnbuf in the nameidata structure. This reduces the effective MAXPATHLEN. Symbolic links replacing termial path components when FOLLOW is set replace the cn_pnbuf in the nameidata structure. This does not reduce the effecive MAXPATHLEN. This is because symbolic links are not resolved by calling namei on them in place in the link read buffer (going recursive in namei). This is functionally equivalent to coroutine recursion in FORTRAN, though one does not need to expand local variables into arrays to get a "stack". The storage is the cn_pnbuf, MAXPATHLEN bytes in length. It may be an intentional hack to save kernel stack space. Or it might just be bogus. But it's there. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509200440.VAA13737>