aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2011-02-22 18:44:32 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-11 15:39:27 -0500
commitb064eca2cf6440bf9d5843b24cc4010624031694 (patch)
treef1024db40bf0afb7b764d6ee825d24cd715d1cc5 /fs/nfs/nfs4proc.c
parent3ddeb7c5c61d0d6bfd837487d3454ffdb788bb91 (diff)
NFSv4: Send unmapped uid/gids to the server when using auth_sys
The new behaviour is enabled using the new module parameter 'nfs4_disable_idmapping'. Note that if the server rejects an unmapped uid or gid, then the client will automatically switch back to using the idmapper. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 8f3ada04ea19..1d84e7088af9 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -244,7 +244,7 @@ static int nfs4_delay(struct rpc_clnt *clnt, long *timeout)
244/* This is the error handling routine for processes that are allowed 244/* This is the error handling routine for processes that are allowed
245 * to sleep. 245 * to sleep.
246 */ 246 */
247static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception) 247static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struct nfs4_exception *exception)
248{ 248{
249 struct nfs_client *clp = server->nfs_client; 249 struct nfs_client *clp = server->nfs_client;
250 struct nfs4_state *state = exception->state; 250 struct nfs4_state *state = exception->state;
@@ -296,6 +296,19 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode,
296 break; 296 break;
297 case -NFS4ERR_OLD_STATEID: 297 case -NFS4ERR_OLD_STATEID:
298 exception->retry = 1; 298 exception->retry = 1;
299 break;
300 case -NFS4ERR_BADOWNER:
301 /* The following works around a Linux server bug! */
302 case -NFS4ERR_BADNAME:
303 if (server->caps & NFS_CAP_UIDGID_NOMAP) {
304 server->caps &= ~NFS_CAP_UIDGID_NOMAP;
305 exception->retry = 1;
306 printk(KERN_WARNING "NFS: v4 server %s "
307 "does not accept raw "
308 "uid/gids. "
309 "Reenabling the idmapper.\n",
310 server->nfs_client->cl_hostname);
311 }
299 } 312 }
300 /* We failed to handle the error */ 313 /* We failed to handle the error */
301 return nfs4_map_errors(ret); 314 return nfs4_map_errors(ret);