All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jlayton@redhat.com>
Cc: "Myklebust, Trond" <Trond.Myklebust@netapp.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: [PATCH] nfsd4: use auth_unix unconditionally on backchannel
Date: Wed, 28 Mar 2012 19:09:31 -0400	[thread overview]
Message-ID: <20120328230931.GA13231@fieldses.org> (raw)
In-Reply-To: <20120323170405.GA6089@fieldses.org>

This is a bandaid.

I have a series of patches that actually implement the correct behavior,
but that may not quite be ready for 3.4.

--b.

commit 2f026867c76171d26f003b211063ff0562097d5e
Author: J. Bruce Fields <bfields@redhat.com>
Date:   Wed Mar 28 14:18:16 2012 -0400

    nfsd4: use auth_unix unconditionally on backchannel
    
    This isn't actually correct, but it works with the Linux client, and
    agrees with the behavior we used to have before commit 80fc015bdfe.
    
    Later patches will implement the spec-mandated behavior (which is to use
    the security parameters explicitly given by the client in create_session
    or backchannel_ctl).
    
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 0840fc4..c8e9f63 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -645,7 +645,6 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c
 		.timeout	= &timeparms,
 		.program	= &cb_program,
 		.version	= 0,
-		.authflavor	= clp->cl_flavor,
 		.flags		= (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET),
 	};
 	struct rpc_clnt *client;
@@ -656,6 +655,7 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c
 		args.client_name = clp->cl_principal;
 		args.prognumber	= conn->cb_prog,
 		args.protocol = XPRT_TRANSPORT_TCP;
+		args.authflavor = clp->cl_flavor;
 		clp->cl_cb_ident = conn->cb_ident;
 	} else {
 		if (!conn->cb_xprt)
@@ -665,6 +665,7 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c
 		args.bc_xprt = conn->cb_xprt;
 		args.prognumber = clp->cl_cb_session->se_cb_prog;
 		args.protocol = XPRT_TRANSPORT_BC_TCP;
+		args.authflavor = RPC_AUTH_UNIX;
 	}
 	/* Create RPC client */
 	client = rpc_create(&args);

  reply	other threads:[~2012-03-28 23:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 13:52 [PATCH v10 0/8] nfsd: overhaul the client name tracking code Jeff Layton
2012-03-21 13:52 ` [PATCH v10 1/8] nfsd: convert nfs4_client->cl_cb_flags to a generic flags field Jeff Layton
2012-03-21 20:41   ` J. Bruce Fields
2012-03-21 20:52     ` Jeff Layton
2012-03-21 21:05       ` J. Bruce Fields
2012-03-21 13:52 ` [PATCH v10 2/8] nfsd: add nfsd4_client_tracking_ops struct and a way to set it Jeff Layton
2012-03-21 20:42   ` [PATCH v11 " Jeff Layton
2012-03-21 23:59   ` [PATCH v10 " Jeff Layton
2012-03-21 13:52 ` [PATCH v10 3/8] sunrpc: create nfsd dir in rpc_pipefs Jeff Layton
2012-03-23 12:12   ` J. Bruce Fields
2012-03-23 13:31     ` J. Bruce Fields
2012-03-23 15:20       ` Myklebust, Trond
2012-03-23 15:22         ` J. Bruce Fields
2012-03-23 15:34           ` Myklebust, Trond
2012-03-23 15:53             ` Jeff Layton
2012-03-23 16:12               ` Jeff Layton
2012-03-23 17:04                 ` J. Bruce Fields
2012-03-28 23:09                   ` J. Bruce Fields [this message]
2012-03-28 23:16                     ` [PATCH] nfsd4: use auth_unix unconditionally on backchannel Myklebust, Trond
2012-03-28 23:46                       ` J. Bruce Fields
2012-03-29 14:29                         ` Matt W. Benjamin
2012-03-29 14:29                           ` Matt W. Benjamin
2012-03-29 14:48                           ` J. Bruce Fields
2012-03-23 16:00             ` [PATCH v10 3/8] sunrpc: create nfsd dir in rpc_pipefs J. Bruce Fields
2012-03-21 13:52 ` [PATCH v10 4/8] nfsd: add a per-net-namespace struct for nfsd Jeff Layton
2012-03-21 13:52 ` [PATCH v10 5/8] nfsd: add a header describing upcall to nfsdcld Jeff Layton
2012-03-21 13:52 ` [PATCH v10 6/8] nfsd: add the infrastructure to handle the cld upcall Jeff Layton
2012-03-21 13:52 ` [PATCH v10 7/8] nfsd: add notifier to handle mount/unmount of rpc_pipefs sb Jeff Layton
2012-03-21 13:52 ` [PATCH v10 8/8] nfsd: don't allow legacy client tracker init for anything but init_net Jeff Layton
2012-03-23 17:06 ` [PATCH v10 0/8] nfsd: overhaul the client name tracking code J. Bruce Fields
2012-03-23 17:26   ` Jeff Layton
2012-03-26 20:02     ` J. Bruce Fields
2012-03-27 15:06       ` J. Bruce Fields

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=20120328230931.GA13231@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=jlayton@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.