From pspacek@redhat.com Wed Aug 24 10:42:15 2016 X-Scanned-BY: MIMEDefang 2.68 on 10.5.11.26 MIME-Version: 1.0 In-Reply-To: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.0 X-RT-Interface: API References: <788ba4fd-9fd2-abf0-8512-3539bc9320ab@redhat.com> <1c3fddb0-405f-42dc-95dc-d8c93ca31270@redhat.com> <20160819191948.GA95615@isc.org> Message-ID: <5fe27eec-63d2-e473-7375-4cc2b5987b2a@redhat.com> content-type: text/plain; charset="utf-8" Organization: Red Hat X-RT-Original-Encoding: utf-8 Received: from mx.pao1.isc.org (mx.pao1.isc.org [149.20.64.53]) by bugs.isc.org (Postfix) with ESMTP id DF67871B5A8 for ; Wed, 24 Aug 2016 10:42:14 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.pao1.isc.org (Postfix) with ESMTPS id 50CDB3493BB for ; Wed, 24 Aug 2016 10:42:12 +0000 (UTC) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F147F13A99 for ; Wed, 24 Aug 2016 10:41:41 +0000 (UTC) Received: from pspacek.brq.redhat.com (pspacek.brq.redhat.com [10.34.128.7]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7OAfe8T007234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 24 Aug 2016 06:41:41 -0400 Delivered-To: bind9-review@bugs.isc.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 Subject: Re: [ISC-Bugs #43050] pre-release DynDB nits Return-Path: X-Original-To: bind9-review@bugs.isc.org Date: Wed, 24 Aug 2016 12:41:40 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 24 Aug 2016 10:41:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mx.pao1.isc.org To: bind9-review@isc.org Content-Transfer-Encoding: 7bit From: "Petr Spacek" RT-Message-ID: Content-Length: 1011 On 23.8.2016 01:07, Evan Hunt via RT wrote: > >> Perhaps we could associate the line number value with it, though, and >> pass that to the plugin, so that when the plugin parsed its input it would >> have an accurate line number to report when errors were encountered. > > Turns out this is already doable -- you can get the line number of the > bracketed text object by using cfg_obj_line(obj). I think it's only necessary > to add a 'lineno' parameter to dns_dyndb_load(). > >> (If the plugin is parsing its input using libisccfg, then we may need >> to update libisccfg so you can set an initial line number. I can't recall >> whether such a mechanism already exists.) > > This mechanism, however, does not yet exist. > > I'd implement it as a lexer function, isc_lex_setsourceline(), and call > that on parser->lexer before calling cfg_parse_buffer(). It sounds good to me. Will it set name of the file as well? It gets handy when "include" is used all over named.conf. -- Petr Spacek @ Red Hat