nfsd4: fix setclientid_confirm same_cred check
authorJ. Bruce Fields <bfields@redhat.com>
Sat, 19 May 2012 02:42:16 +0000 (22:42 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 1 Jun 2012 00:30:03 +0000 (20:30 -0400)
commit788c1eba50133777df5ca2972cda3c9a8f78f52f
treec1b9c1e4a47e52cd854272aec9d5dfc22bfd3313
parent34b232bb3742dc88eef7352da2ca018f51ac4561
nfsd4: fix setclientid_confirm same_cred check

New clients are created only by nfsd4_setclientid(), which always gives
any new client a unique clientid.  The only exception is in the
"callback update" case, in which case it may create an unconfirmed
client with the same clientid as a confirmed client.  In that case it
also checks that the confirmed client has the same credential.

Therefore, it is pointless for setclientid_confirm to check whether a
confirmed and unconfirmed client with the same clientid have matching
credentials--they're guaranteed to.

Instead, it should be checking whether the credential on the
setclientid_confirm matches either of those.  Otherwise, it could be
anyone sending the setclientid_confirm.  Granted, I can't see why anyone
would, but still it's probalby safer to check.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c