Skip to content

Commit

Permalink
nfsd4: fix cr_principal comparison check in same_creds
Browse files Browse the repository at this point in the history
commit 5559b50 upstream.

This fixes a wrong check for same cr_principal in same_creds

Introduced by 8fbba96 "nfsd4: stricter
cred comparison for setclientid/exchange_id".

Signed-off-by: Vivek Trivedi <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Vivek Trivedi authored and gregkh committed Aug 9, 2012
1 parent ebe58c7 commit 28b2522
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 28b2522

Please sign in to comment.