Linux NFS development
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Steve Dickson <steved@redhat.com>, Olaf Kirch <okir@suse.de>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: RESTRICTED_STATD
Date: Thu, 4 Sep 2008 16:03:16 +1000	[thread overview]
Message-ID: <18623.31268.970805.5694@notabene.brown> (raw)
In-Reply-To: message from Chuck Lever on Tuesday September 2

On Tuesday September 2, chuck.lever@oracle.com wrote:
> > Only NOTIFY can come from other hosts (to tell us they rebooted).
> 
> Right.  sm_notify_1_svc() grabs the callers IP address with
> 
>     svc_getcaller(rqstp->rq_xprt)->sin_addr
> 
> It converts this to a string and checks this against lp->dns_name, in  
> addition to checking the mon_name that was originally registered to be  
> monitored.  Shouldn't statd check only mon_name against dns_name?  Why  
> does it check both?

If it was to only check one, it would probably to check ip_addr
against dns_name.

The IP address of that the SM_NOTIFY came from is the most reliable
thing we have to identify which host just rebooted.  We use that to
find a 'dns_name' when we first MONitor a host, and use that name for
the file stored in /var/lib/nfs/sm.  We then match the source of
SM_NOTIFY against those file names.

So I think this part of the code really does need to be IPv6-aware.
Certainly matchhostname does.

> > However we don't really want any user to be able to request a callback
> > to any random service....
> > I wonder if anyone uses for statd for anything but lockd, and how
> > could we know?
> 
> I think the real question is whether we should continue to support  
> this "off-label" use.  It adds complexity and security problems, and  
> the code paths that support this aren't ever tested these days, I'm  
> willing to bet.

How about we subtly break it, and then we nobody complains for 12
months, remove it as it was broken anyway :-)

I'm think I'm happy with removing any support for non-lockd uses for
statd.

NeilBrown


  reply	other threads:[~2008-09-04  6:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26 20:41 RESTRICTED_STATD Chuck Lever
2008-08-26 21:08 ` RESTRICTED_STATD NeilBrown
2008-08-27 10:57 ` RESTRICTED_STATD Steve Dickson
     [not found]   ` <48B5332B.2040800-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-08-27 14:14     ` RESTRICTED_STATD Chuck Lever
     [not found]       ` <76bd70e30808270714p4342c8c3k8d1b98763cc95aef-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-29 20:56         ` RESTRICTED_STATD Chuck Lever
2008-08-29 21:31           ` RESTRICTED_STATD NeilBrown
     [not found]             ` <3400963b9465552abb83ecefede125bc.squirrel-eq65iwfR9nKIECXXMXunQA@public.gmane.org>
2008-09-02 22:17               ` RESTRICTED_STATD Chuck Lever
2008-09-04  6:03                 ` Neil Brown [this message]
     [not found]                   ` <18623.31268.970805.5694-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-09-04  7:38                     ` RESTRICTED_STATD Olaf Kirch
2008-09-04 15:51                     ` RESTRICTED_STATD Chuck Lever
2008-09-05  1:26                       ` RESTRICTED_STATD Neil Brown
     [not found]                         ` <18624.35551.98462.115701-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-09-05  1:59                           ` RESTRICTED_STATD Chuck Lever
2008-09-05  6:56                           ` RESTRICTED_STATD Olaf Kirch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18623.31268.970805.5694@notabene.brown \
    --to=neilb@suse.de \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=okir@suse.de \
    --cc=steved@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox