+2001-06-04 Ezra Peisach <epeisach@mit.edu>
+
+ * kdc_util.c (add_to_transited): Add braces to provide unambiguous
+ if - if - else statements.
+
+ * kdc_preauth.c (verify_sam_response): Cleanup assignments in
+ conditionals.
+ * main.c (main): Likewise.
+
2001-04-26 Ken Raeburn <raeburn@mit.edu>
* configure.in: Don't use HAS_ANSI_VOLATILE.
rep.server = "SAM/rc"; /* Should not match any principal name. */
rep.ctime = psr->stime;
rep.cusec = psr->susec;
- if (retval = krb5_rc_store(kdc_context, kdc_rcache, &rep)) {
+ retval = krb5_rc_store(kdc_context, kdc_rcache, &rep);
+ if (retval) {
com_err("krb5kdc", retval, "SAM psr replay attack!");
goto cleanup;
}
krb5_auth_context auth_context = NULL;
krb5_authenticator * authenticator = NULL;
krb5_checksum * his_cksum = NULL;
- krb5_keyblock * key = NULL;
- krb5_kvno kvno = 0;
+/* krb5_keyblock * key = NULL;*/
+/* krb5_kvno kvno = 0;*/
if (!request->padata)
return KRB5KDC_ERR_PADATA_TYPE_NOSUPP;
krb5_boolean more;
int nprincs;
krb5_key_data * server_key;
- int i;
nprincs = 1;
/* read field into current */
for (i = 0; *otrans != '\0';) {
- if (*otrans == '\\')
- if (*(++otrans) == '\0')
- break;
- else
- continue;
- if (*otrans == ',') {
- otrans++;
- break;
- }
- current[i++] = *otrans++;
- if (i >= MAX_REALM_LN) {
- retval = KRB5KRB_AP_ERR_ILL_CR_TKT;
- goto fail;
- }
+ if (*otrans == '\\') {
+ if (*(++otrans) == '\0')
+ break;
+ else
+ continue;
+ }
+ if (*otrans == ',') {
+ otrans++;
+ break;
+ }
+ current[i++] = *otrans++;
+ if (i >= MAX_REALM_LN) {
+ retval = KRB5KRB_AP_ERR_ILL_CR_TKT;
+ goto fail;
+ }
}
current[i] = '\0';
/* read field into next */
for (i = 0; *otrans != '\0';) {
- if (*otrans == '\\')
- if (*(++otrans) == '\0')
- break;
- else
- continue;
- if (*otrans == ',') {
- otrans++;
- break;
- }
- next[i++] = *otrans++;
- if (i >= MAX_REALM_LN) {
- retval = KRB5KRB_AP_ERR_ILL_CR_TKT;
- goto fail;
- }
+ if (*otrans == '\\') {
+ if (*(++otrans) == '\0')
+ break;
+ else
+ continue;
+ }
+ if (*otrans == ',') {
+ otrans++;
+ break;
+ }
+ next[i++] = *otrans++;
+ if (i >= MAX_REALM_LN) {
+ retval = KRB5KRB_AP_ERR_ILL_CR_TKT;
+ goto fail;
+ }
}
next[i] = '\0';
nlst = i - 1;
krb5_enctype *ktype;
{
int i;
- krb5_enctype dfl = 0;
for (i = 0; i < nktypes; i++) {
if (!valid_enctype(ktype[i]))