linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Mayhew <smayhew@redhat.com>
To: Kinglong Mee <kinglongmee@gmail.com>
Cc: Steve Dickson <SteveD@redhat.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] rpc.mountd: Remove duplicate and invalid secinfo setting
Date: Fri, 17 Apr 2015 14:15:03 -0400	[thread overview]
Message-ID: <20150417181503.GT63078@tonberry.usersys.redhat.com> (raw)
In-Reply-To: <552FB045.80604@gmail.com>

On Thu, 16 Apr 2015, Kinglong Mee wrote:

> NFSD return reply of client's SECINFO_NO_NAME request with four
> security information number as, 1 1 0 0
> 
> It's caused by commit 4a1ad4aa30,
> "mountd: Enable all auth flavors on pseudofs exports"
> 
> This patch removes duplicate secinfo and invalid secinfo (zero).
> 
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>

This is because flav_map has both AUTH_UNIX/AUTH_SYS and
AUTH_NULL/AUTH_NONE.  I had discussed it with Steve, but since I didn't
observe any problems caused by it in my testing I just left them in.

Acked-by: Scott Mayhew <smayhew@redhat.com>

> ---
>  support/nfs/exports.c | 2 +-
>  utils/mountd/v4root.c | 3 +++
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/support/nfs/exports.c b/support/nfs/exports.c
> index 761a046..0aea6f1 100644
> --- a/support/nfs/exports.c
> +++ b/support/nfs/exports.c
> @@ -408,7 +408,7 @@ int secinfo_addflavor(struct flav_info *flav, struct exportent *ep)
>  	struct sec_entry *p;
>  
>  	for (p=ep->e_secinfo; p->flav; p++) {
> -		if (p->flav == flav)
> +		if (p->flav == flav || p->flav->fnum == flav->fnum)
>  			return p - ep->e_secinfo;
>  	}
>  	if (p - ep->e_secinfo >= SECFLAVOR_COUNT) {
> diff --git a/utils/mountd/v4root.c b/utils/mountd/v4root.c
> index 429ebb8..d521725 100644
> --- a/utils/mountd/v4root.c
> +++ b/utils/mountd/v4root.c
> @@ -69,6 +69,9 @@ set_pseudofs_security(struct exportent *pseudo, int flags)
>  	for (flav = flav_map; flav < flav_map + flav_map_size; flav++) {
>  		struct sec_entry *new;
>  
> +		if (!flav->fnum)
> +			continue;
> +
>  		i = secinfo_addflavor(flav, pseudo);
>  		new = &pseudo->e_secinfo[i];
>  
> -- 
> 2.3.5
> 


  reply	other threads:[~2015-04-17 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 12:51 [PATCH] rpc.mountd: Remove duplicate and invalid secinfo setting Kinglong Mee
2015-04-17 18:15 ` Scott Mayhew [this message]
2015-05-06 13:38   ` Kinglong Mee
2015-05-07 14:17 ` Steve Dickson

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=20150417181503.GT63078@tonberry.usersys.redhat.com \
    --to=smayhew@redhat.com \
    --cc=SteveD@redhat.com \
    --cc=kinglongmee@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).