pat="identity and name fields are not the same"
grep "$pat" checkconf.out > /dev/null || ret=1
;;
- bad-update-policy*.conf)
+ bad-update-policy[4589].conf)
pat="name field not set to placeholder value"
grep "$pat" checkconf.out > /dev/null || ret=1
;;
+ bad-update-policy[67].conf)
+ pat="missing name field type '.*' found"
+ grep "$pat" checkconf.out > /dev/null || ret=1
+ ;;
esac
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
dns_fixedname_t fixed_id, fixed_name;
dns_name_t *id, *name;
const char *str;
+ isc_textregion_t r;
+ dns_rdatatype_t type;
/* Check for "update-policy local;" */
if (cfg_obj_isstring(policy) &&
}
/*
- * There is no name field for subzone.
+ * There is no name field for subzone and dname is void
*/
- if (tresult == ISC_R_SUCCESS &&
- mtype != dns_ssumatchtype_subdomain)
+ if (mtype == dns_ssumatchtype_subdomain &&
+ cfg_obj_isvoid(dname))
{
+ str = "."; /* Use "." as a replacement. */
+ } else {
str = cfg_obj_asstring(dname);
+ }
+ if (tresult == ISC_R_SUCCESS) {
tresult = dns_name_fromstring(name, str, 0, NULL);
if (tresult != ISC_R_SUCCESS) {
cfg_obj_log(dname, logctx, ISC_LOG_ERROR,
}
break;
case dns_ssumatchtype_name:
- case dns_ssumatchtype_subdomain:
+ case dns_ssumatchtype_subdomain: /* also zonesub */
case dns_ssumatchtype_subdomainms:
case dns_ssumatchtype_subdomainkrb5:
case dns_ssumatchtype_wildcard:
case dns_ssumatchtype_external:
case dns_ssumatchtype_local:
+ if (tresult == ISC_R_SUCCESS) {
+ DE_CONST(str, r.base);
+ r.length = strlen(str);
+ tresult = dns_rdatatype_fromtext(&type, &r);
+ }
+ if (tresult == ISC_R_SUCCESS) {
+ cfg_obj_log(identity, logctx, ISC_LOG_ERROR,
+ "missing name field type '%s' "
+ "found", str);
+ result = ISC_R_FAILURE;
+ break;
+ }
break;
default:
INSIST(0);
element2 = cfg_list_next(element2))
{
const cfg_obj_t *typeobj;
- isc_textregion_t r;
- dns_rdatatype_t type;
typeobj = cfg_listelt_value(element2);
DE_CONST(cfg_obj_asstring(typeobj), r.base);