--- ./fs/nfs/nfs3proc.c.orig 2005-07-29 12:10:15.000000000 +0200 +++ ./fs/nfs/nfs3proc.c 2005-07-29 13:50:13.000000000 +0200 @@ -50,11 +50,20 @@ return res; } -static __inline__ int -nfs3_rpc(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp) +static int +new_nfs3_rpc(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, + struct rpc_groups *fsg) { - return nfs3_rpc_call(clnt, proc, argp, resp, NULL, 0); + struct rpc_cred *cred; + int res; + + if ((cred = rpcauth_lookupcred(clnt->cl_auth, fsg, 0)) == NULL) + return -ENOMEM; + res = nfs3_rpc_call(clnt, proc, argp, resp, cred, 0); + put_rpccred(cred); + return res; } +#define nfs3_rpc(clnt,proc,argp,resp,...) new_nfs3_rpc(clnt,proc,argp,resp,NULL) static int nfs3_async_handle_jukebox(struct rpc_task *task) --- ./fs/nfs/proc.c.orig 2005-07-29 11:59:48.000000000 +0200 +++ ./fs/nfs/proc.c 2005-07-29 13:50:13.000000000 +0200 @@ -62,11 +62,20 @@ return rpc_call_sync(clnt, &msg, flags); } -static __inline__ int -nfs2_rpc(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp) +static int +new_nfs2_rpc(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, + struct rpc_groups *fsg) { - return nfs2_rpc_call(clnt, proc, argp, resp, NULL, 0); + struct rpc_cred *cred; + int res; + + if ((cred = rpcauth_lookupcred(clnt->cl_auth, fsg, 0)) == NULL) + return -ENOMEM; + res = nfs2_rpc_call(clnt, proc, argp, resp, cred, 0); + put_rpccred(cred); + return res; } +#define nfs2_rpc(clnt,proc,argp,resp,...) new_nfs2_rpc(clnt,proc,argp,resp,NULL) /* * Bare-bones access to getattr: this is for nfs_read_super.