* [PATCH] Make locks work on NFS3 krb5 mounts
@ 2004-09-23 20:48 Mark Goodman
0 siblings, 0 replies; only message in thread
From: Mark Goodman @ 2004-09-23 20:48 UTC (permalink / raw)
To: Trond Myklebust; +Cc: linux-kernel
This patch makes locks work on NFS3 krb5 mounts. In particular, it makes
gconf-sanity-check-1 succeed when my home directory is a NFS3 krb5
mount. gconf-sanity-check-1 is part of GConf. It applies to 2.6.9-rc2.
Please consider applying.
Signed-off-by: Mark Goodman <mgoodman@csua.berkeley.edu>
--- linux-2.6.9-rc2/net/sunrpc/clnt.c.orig 2004-09-12
22:32:17.000000000 -0700
+++ linux-2.6.9-rc2/net/sunrpc/clnt.c 2004-09-23 13:35:12.028606648 -0700
@@ -425,6 +425,16 @@ rpc_call_setup(struct rpc_task *task, st
{
task->tk_msg = *msg;
task->tk_flags |= flags;
+
+ /*
+ * For a nfs3 krb5 mount, lockd tries to use a RPCSEC cred with UNIX
+ * auth. If that's the case, get a UNIX cred.
+ */
+ if (task->tk_msg.rpc_cred != NULL &&
+ task->tk_msg.rpc_cred->cr_auth->au_ops != task->tk_auth->au_ops) {
+ task->tk_msg.rpc_cred = NULL;
+ }
+
/* Bind the user cred */
if (task->tk_msg.rpc_cred != NULL) {
rpcauth_holdcred(task);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-23 20:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-23 20:48 [PATCH] Make locks work on NFS3 krb5 mounts Mark Goodman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox