public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: trond.myklebust@primarydata.com
Cc: dros@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfs: don't attempt auth methods that require upcall unless we know that gssd is running
Date: Fri, 24 Jan 2014 07:45:03 -0500	[thread overview]
Message-ID: <20140124074503.05ab18e0@tlielax.poochiereds.net> (raw)
In-Reply-To: <1390565368-17597-1-git-send-email-jlayton@redhat.com>

On Fri, 24 Jan 2014 07:09:28 -0500
Jeff Layton <jlayton@redhat.com> wrote:

> Currently, if the server lists krb5 as an allowed auth method, but gssd isn't
> running, you'll get the infamous "AUTH_GSS upcall failed" message, even if
> you didn't request sec=krb5.
> 
> This is because nfs4_find_root_sec() establishes a default list of auth
> methods to try when the admin didn't supply one, and that list contains
> AUTH_GSS methods first. Skip those methods if gssd isn't running since
> they won't succeed anyway.
> 
> Cc: Weston Andros Adamson <dros@netapp.com>
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> ---
>  fs/nfs/nfs4proc.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 15052b8..468a581 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -2900,6 +2900,13 @@ static int nfs4_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,
>  	} else {
>  		/* no flavors specified by user, try default list */
>  		for (i = 0; i < ARRAY_SIZE(flav_array); i++) {
> +			/*
> +			 * Don't attempt to upcall with the default list
> +			 * unless we know that gssd is running.
> +			 */
> +			if (!gssd_running(server->nfs_client->cl_net))
> +				continue;
> +
>  			status = nfs4_lookup_root_sec(server, fhandle, info,
>  						      flav_array[i]);
>  			if (status == -NFS4ERR_WRONGSEC || status == -EACCES)

Eep! Wrong patch. I'll resend. Sorry for the noise...

-- 
Jeff Layton <jlayton@redhat.com>

      reply	other threads:[~2014-01-24 12:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-24 12:09 [PATCH] nfs: don't attempt auth methods that require upcall unless we know that gssd is running Jeff Layton
2014-01-24 12:45 ` Jeff Layton [this message]

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=20140124074503.05ab18e0@tlielax.poochiereds.net \
    --to=jlayton@redhat.com \
    --cc=dros@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.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