Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Olga Kornievskaia <aglo@citi.umich.edu>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/6] SUNRPC: Fix RPCAUTH_LOOKUP_ROOTCREDS
Date: Thu, 13 Mar 2008 15:43:30 -0400	[thread overview]
Message-ID: <20080313194330.GK29517@fieldses.org> (raw)
In-Reply-To: <1205436339.13453.35.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>

On Thu, Mar 13, 2008 at 03:25:38PM -0400, Trond Myklebust wrote:
> 
> On Thu, 2008-03-13 at 15:19 -0400, Trond Myklebust wrote:
> > On Thu, 2008-03-13 at 15:11 -0400, Olga Kornievskaia wrote:
> > > Trond,
> > > 
> > >     We were thinking of using RPCAUTH_LOOKUP_ROOTCREDS flag to acquire 
> > > machine creds for authenticated callback.
> > 
> > I'd strongly suggest using a different flag for that purpose. The
> > function of RPCAUTH_LOOKUP_ROOTCREDS _today_ is to allow a future
> > swap-over-nfs to use root credentials when paging out memory.
> > 
> > That is not the same as machine creds...
> 
> 
> In fact, I'd strongly urge you to add the information for machine creds
> to the 'struct auth_cred' instead. The latter is the lookup key for
> 'rpc_authops->lookup_cred()'.

So something like 

diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index 7a69ca3..d624169 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -26,6 +26,7 @@ struct auth_cred {
 	uid_t	uid;
 	gid_t	gid;
 	struct group_info *group_info;
+	int	is_machine_cred;
 };
 
?  No objection, but it seems like mild overkill for a single bit when
the necessary functions already take a flag parameter.  Or do you want
this information in that structure for future uses of the auth_cred as a
key into a more general cred cache?

--b.

  parent reply	other threads:[~2008-03-13 19:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080313174806.13840.90325.stgit@c-69-242-210-120.hsd1.mi.comcast.net>
     [not found] ` <20080313174806.13840.90325.stgit-KPEdlmqt5P7XOazzY/2fV4TcuzvYVacciM950cveMlzk1uMJSBkQmQ@public.gmane.org>
2008-03-13 17:48   ` [PATCH 1/6] SUNRPC: Fix a bug in rpcauth_lookup_credcache() Trond Myklebust
     [not found]     ` <20080313174806.13840.26367.stgit-KPEdlmqt5P7XOazzY/2fV4TcuzvYVacciM950cveMlzk1uMJSBkQmQ@public.gmane.org>
2008-03-28 15:12       ` J. Bruce Fields
2008-03-28 19:08         ` Trond Myklebust
2008-03-13 17:48   ` [PATCH 2/6] SUNRPC: Fix RPCAUTH_LOOKUP_ROOTCREDS Trond Myklebust
     [not found]     ` <20080313174807.13840.38440.stgit-KPEdlmqt5P7XOazzY/2fV4TcuzvYVacciM950cveMlzk1uMJSBkQmQ@public.gmane.org>
2008-03-13 19:11       ` Olga Kornievskaia
2008-03-13 19:19         ` Trond Myklebust
     [not found]           ` <1205435968.13453.27.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-03-13 19:25             ` Trond Myklebust
     [not found]               ` <1205436339.13453.35.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-03-13 19:43                 ` J. Bruce Fields [this message]
2008-03-13 20:36                   ` Trond Myklebust
     [not found]                     ` <1205440566.15354.21.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-03-13 20:42                       ` Trond Myklebust
2008-03-13 20:45                       ` J. Bruce Fields
2008-03-13 19:30             ` Olga Kornievskaia
2008-03-13 19:39               ` Trond Myklebust
2008-03-28 15:32       ` J. Bruce Fields
2008-03-28 17:05         ` Chuck Lever
2008-03-13 17:48   ` [PATCH 3/6] SUNRPC: Clean up rpcauth_bindcred() Trond Myklebust
2008-03-13 17:48   ` [PATCH 4/6] SUNRPC: Add a generic RPC credential Trond Myklebust
     [not found]     ` <20080313174809.13840.50790.stgit-KPEdlmqt5P7XOazzY/2fV4TcuzvYVacciM950cveMlzk1uMJSBkQmQ@public.gmane.org>
2008-03-28 15:35       ` J. Bruce Fields
2008-03-28 19:15         ` Trond Myklebust
2008-03-13 17:48   ` [PATCH 5/6] SUNRPC: Add an rpc_credop callback for binding a credential to an rpc_task Trond Myklebust
2008-03-13 17:48   ` [PATCH 6/6] SUNRPC: Add a helper rpcauth_lookup_generic_cred() Trond Myklebust

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=20080313194330.GK29517@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=aglo@citi.umich.edu \
    --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