mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-02 01:06:46 +09:00
nfsd4: fix cr_principal comparison check in same_creds
commit5559b50acdupstream. This fixes a wrong check for same cr_principal in same_creds Introduced by8fbba96e5b"nfsd4: stricter cred comparison for setclientid/exchange_id". Signed-off-by: Vivek Trivedi <vtrivedi018@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ebe58c7cec
commit
28b25222cd
@@ -1215,7 +1215,7 @@ static bool groups_equal(struct group_info *g1, struct group_info *g2)
|
||||
return true;
|
||||
}
|
||||
|
||||
static int
|
||||
static bool
|
||||
same_creds(struct svc_cred *cr1, struct svc_cred *cr2)
|
||||
{
|
||||
if ((cr1->cr_flavor != cr2->cr_flavor)
|
||||
@@ -1227,7 +1227,7 @@ same_creds(struct svc_cred *cr1, struct svc_cred *cr2)
|
||||
return true;
|
||||
if (!cr1->cr_principal || !cr2->cr_principal)
|
||||
return false;
|
||||
return 0 == strcmp(cr1->cr_principal, cr1->cr_principal);
|
||||
return 0 == strcmp(cr1->cr_principal, cr2->cr_principal);
|
||||
}
|
||||
|
||||
static void gen_clid(struct nfs4_client *clp)
|
||||
|
||||
Reference in New Issue
Block a user