2005-09-22 14:11:08

by Lever, Charles

[permalink] [raw]
Subject: RE: [NFS] Re: [PATCH] repair nfsd/sunrpc in 2.6.14-rc2-mm1 (and other -mm versions)

> -----Original Message-----
> From: Steve Dickson [mailto:[email protected]]
> Sent: Thursday, September 22, 2005 10:02 AM
> To: linux-kernel
> Cc: [email protected]
> Subject: [NFS] Re: [PATCH] repair nfsd/sunrpc in
> 2.6.14-rc2-mm1 (and other -mm versions)
>
> Max Kellermann wrote:
> > Your -mm patches make the sunrpc client connect to the
> portmapper with
> > a non-privileged source port. This is due to a change in
> > net/sunrpc/pmap_clnt.c, which manually resets the xprt->resvport
> > field. My tiny patch removes this line. I have no idea
> why the line
> > was added in the first place, does somebody know better?
> Yes this is a bug, since most Linux portmapper will not
> allow ports to be set or unset using non-privilege ports.
> But non-privilege ports can be used to get ports information.
> So I would suggest the following patch that stops the
> use of privileges ports on only get port requests.

this was my patch (idea was steve's). i've already sent a fix to
andrew. andrew please let me know if you haven't received it.


2005-09-22 19:33:04

by Andrew Morton

[permalink] [raw]
Subject: Re: [NFS] Re: [PATCH] repair nfsd/sunrpc in 2.6.14-rc2-mm1 (and other -mm versions)

"Lever, Charles" <[email protected]> wrote:
>
> > -----Original Message-----
> > From: Steve Dickson [mailto:[email protected]]
> > Sent: Thursday, September 22, 2005 10:02 AM
> > To: linux-kernel
> > Cc: [email protected]
> > Subject: [NFS] Re: [PATCH] repair nfsd/sunrpc in
> > 2.6.14-rc2-mm1 (and other -mm versions)
> >
> > Max Kellermann wrote:
> > > Your -mm patches make the sunrpc client connect to the
> > portmapper with
> > > a non-privileged source port. This is due to a change in
> > > net/sunrpc/pmap_clnt.c, which manually resets the xprt->resvport
> > > field. My tiny patch removes this line. I have no idea
> > why the line
> > > was added in the first place, does somebody know better?
> > Yes this is a bug, since most Linux portmapper will not
> > allow ports to be set or unset using non-privilege ports.
> > But non-privilege ports can be used to get ports information.
> > So I would suggest the following patch that stops the
> > use of privileges ports on only get port requests.
>
> this was my patch (idea was steve's). i've already sent a fix to
> andrew. andrew please let me know if you haven't received it.

Ah, good. Please resend?

2005-09-22 19:47:07

by Peter Staubach

[permalink] [raw]
Subject: Re: [NFS] Re: [PATCH] repair nfsd/sunrpc in 2.6.14-rc2-mm1 (and other -mm versions)

Andrew Morton wrote:

>"Lever, Charles" <[email protected]> wrote:
>
>
>>>-----Original Message-----
>>>
>>>
>> > From: Steve Dickson [mailto:[email protected]]
>> > Sent: Thursday, September 22, 2005 10:02 AM
>> > To: linux-kernel
>> > Cc: [email protected]
>> > Subject: [NFS] Re: [PATCH] repair nfsd/sunrpc in
>> > 2.6.14-rc2-mm1 (and other -mm versions)
>> >
>> > Max Kellermann wrote:
>> > > Your -mm patches make the sunrpc client connect to the
>> > portmapper with
>> > > a non-privileged source port. This is due to a change in
>> > > net/sunrpc/pmap_clnt.c, which manually resets the xprt->resvport
>> > > field. My tiny patch removes this line. I have no idea
>> > why the line
>> > > was added in the first place, does somebody know better?
>> > Yes this is a bug, since most Linux portmapper will not
>> > allow ports to be set or unset using non-privilege ports.
>> > But non-privilege ports can be used to get ports information.
>> > So I would suggest the following patch that stops the
>> > use of privileges ports on only get port requests.
>>
>> this was my patch (idea was steve's). i've already sent a fix to
>> andrew. andrew please let me know if you haven't received it.
>>
>>
>
>Ah, good. Please resend?
>

Actually, Chuck's patch and Steve's aren't quite the same. Both patches
fix the problem that the portmap daemon requires a request to set something
to come from a reserved port. In addition to this, Steve's patch reduces
the number of reserved ports that the kernel requires. This is the problem
that resulted in pmap_create() being incorrectly modified in the first
place.
Steve's patch correctly puts the support in rpc_getport() where it belongs.

Thanx...

ps