On Tue, Mar 26, 2013 at 12:51, Bob Beck wrote:
> On Tue, Mar 26, 2013 at 11:58 AM, Theo de Raadt <dera...@cvs.openbsd.org>
> wrote:
>>> and doing EINVAL in the v2 case.
>>
>> Which won't solve the problem described in his mail.
> 
> Of course it will - in the NFS v3 case, and in theory you'll be
> getting what the server supports.
> 
> I don't think we should go outside the nfs v2 spec and return values
> we "hope are ok" in the nfs v2 case - remember here we're returning
> the client values and hoping the server can support it. So what you're
> saying is that it's better to return a potentially unsafe value, and
> have filenames that a potential server might not handle?  I'm not
> buying that.  in that special case of I'm running some software that

Well, there's a certain amount of stupidity in pathconf already.
PATH_MAX could cross a mount point and then become something else
entirely. (Actually, that's an argument for factoring it up and
handling it above the fs layer, but that's another diff.)

> does this, I'd rather realize I'm running it on v2 that doesn't
> support it by having it fail than just using the client side value and
> "hope like heck it works out".  Presumably, if I'm running v2, I'm
> doing it for specefic reasons that v2 is better for and I know what
> I'm doing.  I'd rather not have the client start to do v3 like things
> on v2 just so things "might work". - at that point I should be
> noticing the error, and the fix is "mount it v3"

Maybe you're using amd? hahaha. I don't think the nfs v2 spec demands
that pathconf not work, it just doesn't support it because it didn't
exist.

Let me explain my philosophy towards pathconf. It's like those
configure scripts that check to see if you have a working version of
strcpy. If you don't, you are so utterly boned you'll find out soon
enough. If the nfs server isn't going to let you create a 255
character name, you'll find out soon enough. pathconf is one of those
design by committee anti-portability features. It's silly it's even in
the kernel. It should be a libc stub that whispers sweet nothings in
your ear.




Reply via email to