mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
nfsd: nfsd4_setclientid_confirm mistakenly expires confirmed client.
commitab451ea952
upstream. From RFC 7530 Section 16.34.5: o The server has not recorded an unconfirmed { v, x, c, *, * } and has recorded a confirmed { v, x, c, *, s }. If the principals of the record and of SETCLIENTID_CONFIRM do not match, the server returns NFS4ERR_CLID_INUSE without removing any relevant leased client state, and without changing recorded callback and callback_ident values for client { x }. The current code intends to do what the spec describes above but it forgot to set 'old' to NULL resulting to the confirmed client to be expired. Fixes:2b63482185
("nfsd: fix clid_inuse on mount with security change") Signed-off-by: Dai Ngo <dai.ngo@oracle.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Bruce Fields <bfields@fieldses.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ec4334152d
commit
51e88e8922
1 changed files with 3 additions and 1 deletions
|
@ -4047,8 +4047,10 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
|
|||
status = nfserr_clid_inuse;
|
||||
if (client_has_state(old)
|
||||
&& !same_creds(&unconf->cl_cred,
|
||||
&old->cl_cred))
|
||||
&old->cl_cred)) {
|
||||
old = NULL;
|
||||
goto out;
|
||||
}
|
||||
status = mark_client_expired_locked(old);
|
||||
if (status) {
|
||||
old = NULL;
|
||||
|
|
Loading…
Reference in a new issue