diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-04-05 15:37:04 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-04-05 15:37:04 -0400 |
commit | 845cbceb22c67030df76552892ad4935669bf2e5 (patch) | |
tree | 228d2e9683d2ee558b93892098050c19b1c22c3d /fs/nfs | |
parent | ea33e6c3e79d23ef693b7ed3171ef90dddfbfc15 (diff) |
NFSv4: Don't clear the machine cred when client establish returns EACCES
The expected behaviour is that the client will decide at mount time
whether or not to use a krb5i machine cred, or AUTH_NULL.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: Bryan Schumaker <bjschuma@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4state.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 209df6976a5b..c54600962bc6 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -154,18 +154,6 @@ struct rpc_cred *nfs4_get_machine_cred_locked(struct nfs_client *clp) | |||
154 | return cred; | 154 | return cred; |
155 | } | 155 | } |
156 | 156 | ||
157 | static void nfs4_clear_machine_cred(struct nfs_client *clp) | ||
158 | { | ||
159 | struct rpc_cred *cred; | ||
160 | |||
161 | spin_lock(&clp->cl_lock); | ||
162 | cred = clp->cl_machine_cred; | ||
163 | clp->cl_machine_cred = NULL; | ||
164 | spin_unlock(&clp->cl_lock); | ||
165 | if (cred != NULL) | ||
166 | put_rpccred(cred); | ||
167 | } | ||
168 | |||
169 | static struct rpc_cred * | 157 | static struct rpc_cred * |
170 | nfs4_get_renew_cred_server_locked(struct nfs_server *server) | 158 | nfs4_get_renew_cred_server_locked(struct nfs_server *server) |
171 | { | 159 | { |
@@ -1768,10 +1756,6 @@ static int nfs4_handle_reclaim_lease_error(struct nfs_client *clp, int status) | |||
1768 | clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); | 1756 | clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); |
1769 | return -EPERM; | 1757 | return -EPERM; |
1770 | case -EACCES: | 1758 | case -EACCES: |
1771 | if (clp->cl_machine_cred == NULL) | ||
1772 | return -EACCES; | ||
1773 | /* Handle case where the user hasn't set up machine creds */ | ||
1774 | nfs4_clear_machine_cred(clp); | ||
1775 | case -NFS4ERR_DELAY: | 1759 | case -NFS4ERR_DELAY: |
1776 | case -ETIMEDOUT: | 1760 | case -ETIMEDOUT: |
1777 | case -EAGAIN: | 1761 | case -EAGAIN: |