Re: nfs pathconf

2013-03-27 Thread Philip Guenther
On Tue, 26 Mar 2013, Bob Beck wrote: > So, does that make the case for fixing this in VOP_PATHCONF instead? > > Call the underlying filesystem call if it's there? and if not return the > "something sane" there? then we have our "something defaultly sane" > shit in one place? > > Just thinking

Re: nfs pathconf

2013-03-26 Thread Theo de Raadt
> > 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, y

Re: nfs pathconf

2013-03-26 Thread Bob Beck
> 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

Re: nfs pathconf

2013-03-26 Thread Ted Unangst
On Tue, Mar 26, 2013 at 12:51, Bob Beck wrote: > On Tue, Mar 26, 2013 at 11:58 AM, Theo de Raadt > 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 s

Re: nfs pathconf

2013-03-26 Thread Bob Beck
On Tue, Mar 26, 2013 at 11:58 AM, Theo de Raadt 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

Re: nfs pathconf

2013-03-26 Thread Philip Guenther
On Tue, Mar 26, 2013 at 10:53 AM, Bob Beck wrote: > Well, you're right about one thing - the comment there says that it should > just return EINVAL for nfs v2 - and I think it should - but that code returns > EINVAL for v3 - and that's wrong. We have server side support for this in v3 > and what

Re: nfs pathconf

2013-03-26 Thread Theo de Raadt
> and doing EINVAL in the v2 case. Which won't solve the problem described in his mail.

Re: nfs pathconf

2013-03-26 Thread Bob Beck
Well, you're right about one thing - the comment there says that it should just return EINVAL for nfs v2 - and I think it should - but that code returns EINVAL for v3 - and that's wrong. We have server side support for this in v3 and what we should probably be doing is actually doing the rpc call

nfs pathconf

2013-03-26 Thread Ted Unangst
After an absence of 9 years, I make my triumphant return to sys/nfs. There are some silly programs out there (looking at you boost) that actually use pathconf instead of just hard coding 1024 for max path length. If you run them from nfs, fireworks ensue. Here's a pathconf implementation for nfs,