From: Arran Cudbard-Bell Date: Fri, 4 Jan 2019 09:00:56 +0000 (+0800) Subject: Disable foreign attribute check X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5f578ccb8b2dedc17367f020c57e9eda908feb4;p=thirdparty%2Ffreeradius-server.git Disable foreign attribute check --- diff --git a/src/lib/server/tmpl.c b/src/lib/server/tmpl.c index 72529a21677..ffec8863ab1 100644 --- a/src/lib/server/tmpl.c +++ b/src/lib/server/tmpl.c @@ -812,7 +812,21 @@ ssize_t tmpl_afrom_attr_substr(TALLOC_CTX *ctx, vp_tmpl_t **out, char const *nam /* * Check that the attribute we resolved was from an allowed dictionary */ - } else if ((rules->dict_def && (found_in != rules->dict_def))) { + } +#if 0 + else if ((rules->dict_def && (found_in != rules->dict_def))) { + /* + * @fixme - We can't enforce this until we support nested attributes + * where the change of attribute context gives us a new dictionary. + * + * i.e. + * + * My-Dhcp-In-RADIUS-Attribute.My-DHCP-Attribute + * | ||_ DHCP attribute + * | |_ Lookup inside linking attribute triggers dictionary change + * |_ RADIUS attribute + */ + if (!rules->allow_foreign) { fr_strerror_printf("Only attributes from the %s protocol are allowed here", fr_dict_root(rules->dict_def)->name); @@ -820,6 +834,7 @@ ssize_t tmpl_afrom_attr_substr(TALLOC_CTX *ctx, vp_tmpl_t **out, char const *nam goto error; } } +#endif } /*