aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorVivek Trivedi <vtrivedi018@gmail.com>2012-07-24 11:48:20 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-07-25 09:05:30 -0400
commit5559b50acdcdcad7e362882d3261bf934c9436f6 (patch)
treea6debec42b71d76d7b2f86482b579edd092afb26 /fs/nfsd
parent200724a7074281e7a0bf1101784a59fecddfa77d (diff)
nfsd4: fix cr_principal comparison check in same_creds
This fixes a wrong check for same cr_principal in same_creds Introduced by 8fbba96e5b327665265ad02b7f331b68536828bf "nfsd4: stricter cred comparison for setclientid/exchange_id". Cc: stable@vger.kernel.org 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>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index e404fca08260..fe96015fbfcb 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1221,7 +1221,7 @@ static bool groups_equal(struct group_info *g1, struct group_info *g2)
1221 return true; 1221 return true;
1222} 1222}
1223 1223
1224static int 1224static bool
1225same_creds(struct svc_cred *cr1, struct svc_cred *cr2) 1225same_creds(struct svc_cred *cr1, struct svc_cred *cr2)
1226{ 1226{
1227 if ((cr1->cr_flavor != cr2->cr_flavor) 1227 if ((cr1->cr_flavor != cr2->cr_flavor)
@@ -1233,7 +1233,7 @@ same_creds(struct svc_cred *cr1, struct svc_cred *cr2)
1233 return true; 1233 return true;
1234 if (!cr1->cr_principal || !cr2->cr_principal) 1234 if (!cr1->cr_principal || !cr2->cr_principal)
1235 return false; 1235 return false;
1236 return 0 == strcmp(cr1->cr_principal, cr1->cr_principal); 1236 return 0 == strcmp(cr1->cr_principal, cr2->cr_principal);
1237} 1237}
1238 1238
1239static void gen_clid(struct nfs4_client *clp) 1239static void gen_clid(struct nfs4_client *clp)