From pspacek@redhat.com Tue Aug 16 14:26:03 2016 X-Scanned-BY: MIMEDefang 2.68 on 10.5.11.27 CC: "Evan Hunt" MIME-Version: 1.0 In-Reply-To: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.0 X-RT-Interface: API References: Message-ID: <868283f4-4423-0b7d-2327-b72d9d696296@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 [IPv6:2001:4f8:0:2::2b]) by bugs.isc.org (Postfix) with ESMTP id 1BA5A71B5A8 for ; Tue, 16 Aug 2016 14:26:03 +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 CE19B3493DE; Tue, 16 Aug 2016 14:26:00 +0000 (UTC) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (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 A2A8E7DD04; Tue, 16 Aug 2016 14:25:59 +0000 (UTC) Received: from pspacek.brq.redhat.com (pspacek.brq.redhat.com [10.34.128.7]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7GEPuiI023720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Aug 2016 10:25:58 -0400 Delivered-To: bind9-bugs@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] AutoReply: pre-release DynDB nits Return-Path: X-Original-To: bind9-bugs@bugs.isc.org Date: Tue, 16 Aug 2016 16:25:56 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 16 Aug 2016 14:25:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mx.pao1.isc.org To: bind9-bugs@isc.org Content-Transfer-Encoding: 7bit From: "Petr Spacek" RT-Message-ID: Content-Length: 1920 On 16.8.2016 13:38, BIND9 Bugs via RT wrote: > Hello Evan and others, > > attempt to port bind-dyndb-ldap to dyndb API shipped with BIND 9.11 uncovered > couple of nits in current dyndb code. > > I believe that it is worth fixing them before the final release: > > 1) Docs in the example driver were outdated. A patch is attached. > > 2) Function dns_dyndb_register_t register_func is given the text between {} in > dyndb section. > > Following snippet is causing problems: > dyndb "name" "library.so" { > custom_structure { > blah 1; > nah 2; > }; > }; > > When register_func is called, all inner curly braces are gone. > > This makes impossible to re-use map parsers from libraries. I peeked at the > isc_tokentype_btext handling in isc_lex_gettoken() but I'm sure what is the > right approach to fix this. > > Ideally, I would like to send the complete text into the plugin and let plugin > to deal with it (possibly by calling ISC parser with custom grammar definition). > > It is possible to escape all the curly braces using \{ \} but that is quite > ugly for any non-trivial structures. > > Would it be possible to convince the parser not to remove {} from the > isc_tokentype_btext? I just found third problem: 3) bind-dyndb-ldap is using header file errno2result.h from isc/unix, which is not installed by BIND's 'make install'. Would it be possible to add this header to the list of installed headers? I can see that the function in it has isc__ prefix. Would it be possible to make it public? Quick & dirty port of bind-dyndb-ldap to BIND 9.11 is available on: https://github.com/pspacek/bind-dyndb-ldap/tree/v11 It is not finished by any means. At least the configuration is awkward at the moment and I suspect that there are be some race conditions somewhere in event processing on plugin startup/reload/shutdown. I will look into these later this week. -- Petr Spacek @ Red Hat