goto out;
}
+ /*
+ * We require that the delegating server (r->client) is local
+ * and was found in the local database.
+ */
+ if (r->client == NULL) {
+ ret = KRB5KDC_ERR_BADOPTION;
+ kdc_audit_addreason((kdc_request_t)r, "Remote delegating server");
+ kdc_log(r->context, r->config, 4,
+ "Constrained delegation without local delegating server, %s/%s",
+ r->cname, r->sname);
+ goto out;
+ }
+
t = &b->additional_tickets->val[0];
ret = _krb5_principalname2krb5_principal(r->context,