summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/krb/rd_req_dec.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2007-05-10 02:37:22 +0000
committerKen Raeburn <raeburn@mit.edu>2007-05-10 02:37:22 +0000
commit86ef9dd0422b95ccf2b29f18847c47b6b9e2e6c5 (patch)
tree083595efb37a3c68d86276a7cf705b22a9cf51c3 /src/lib/krb5/krb/rd_req_dec.c
parent9ad9a49b388bee85020e9800050df2fcc8954250 (diff)
downloadkrb5-86ef9dd0422b95ccf2b29f18847c47b6b9e2e6c5.tar.gz
krb5-86ef9dd0422b95ccf2b29f18847c47b6b9e2e6c5.tar.xz
krb5-86ef9dd0422b95ccf2b29f18847c47b6b9e2e6c5.zip
Define and use some inline helper functions for comparing data and authdata structures, instead
of open-coding checks of multiple fields everywhere. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19544 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/rd_req_dec.c')
-rw-r--r--src/lib/krb5/krb/rd_req_dec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/krb5/krb/rd_req_dec.c b/src/lib/krb5/krb/rd_req_dec.c
index a4f825a76..2ab5da5d4 100644
--- a/src/lib/krb5/krb/rd_req_dec.c
+++ b/src/lib/krb5/krb/rd_req_dec.c
@@ -2,7 +2,7 @@
* lib/krb5/krb/rd_req_dec.c
*
* Copyright (c) 1994 CyberSAFE Corporation.
- * Copyright 1990,1991 by the Massachusetts Institute of Technology.
+ * Copyright 1990,1991,2007 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
@@ -189,9 +189,8 @@ goto cleanup;
*/
krb5_get_default_realm(context, &lrealm);
if ((trans->tr_contents.data && trans->tr_contents.data[0]) ||
- strlen(lrealm) != realm->length ||
- memcmp(lrealm, realm->data, strlen(lrealm))) {
- retval = KRB5KRB_AP_ERR_ILL_CR_TKT;
+ !data_eq_string(*realm, lrealm)) {
+ retval = KRB5KRB_AP_ERR_ILL_CR_TKT;
}
free(lrealm);
}