TRACE(c, (c, "Negotiating for enctypes in authenticator: {etypes}", \
etypes))
+#define TRACE_MSPAC_NOSRVCKSUM(c) \
+ TRACE(c, (c, "MS PAC lacks a server checksum. "\
+ "Apple Open Directory bug?"))
+#define TRACE_MSPAC_DISCARD_UNVERF(c) \
+ TRACE(c, (c, "Filtering out unverified MS PAC"))
+
#define TRACE_PREAUTH_COOKIE(c, len, data) \
TRACE(c, (c, "Received cookie: {lenstr}", (size_t) len, data))
#define TRACE_PREAUTH_ENC_TS_KEY_GAK(c, keyblock) \
return EINVAL;
ret = k5_pac_verify_server_checksum(context, pac, server);
- if (ret != 0)
+ if (ret == ENOENT) {
+ /*
+ * Apple Mac OS X Server Open Directory KDC (at least 10.6)
+ * appears to provide a PAC that lacks a server checksum.
+ */
+ TRACE_MSPAC_NOSRVCKSUM(context);
+ pac->verified = FALSE;
+ return ret;
+ } else if (ret != 0) {
return ret;
+ }
if (privsvr != NULL) {
ret = k5_pac_verify_kdc_checksum(context, pac, privsvr);
key,
NULL);
+ /*
+ * If the server checksum is not found, return success to
+ * krb5int_authdata_verify() to work around an apparent Open
+ * Directory bug. Non-verified PACs won't be returned by
+ * mspac_get_attribute().
+ */
+ if (code == ENOENT && !pacctx->pac->verified) {
+ code = 0;
+ }
+
#if 0
/*
* Now, we could return 0 and just set pac->verified to FALSE.
if (*more != -1 || pacctx->pac == NULL)
return ENOENT;
+ /* If it didn't verify, pretend it didn't exist. */
+ if (!pacctx->pac->verified) {
+ TRACE_MSPAC_DISCARD_UNVERF(kcontext);
+ return ENOENT;
+ }
+
code = mspac_attr2type(attribute, &type);
if (code != 0)
return code;