[ldns-users] fixing pyldns signzone example
Willem Toorop
willem at nlnetlabs.nl
Fri Jul 13 08:16:23 UTC 2012
Hi Karel,
Thanks for the fixes and new example script.
Applied and added to trunk.
Best regards,
-- Willem
Op 10-07-12 17:34, Karel Slany schreef:
> Hello,
>
> I'm working with pyldns again and I've discovered several issues all
> addressing the ldns-signzone.py example.
>
> Description of the issues:
>
> The behaviour of the ldns_rr_new_frm_fp_l_() wrapper function has been
> modified. The modification caused Python code errors in the
> ldns_struct_rr.new_frm_fp* functions. To preserve the functionality of
> ldns_struct_rr.new_frm_fp (according to it's docstring) I've introduced
> a new wrapper function ldns_rr_new_frm_fp_().
>
> The ldns_dnssec_zone.add_rr() function caused memory corruption issues
> -- double frees or accessing of recently freed memory. The Python engine
> freed the inserted RR after the reference counter had reached zero.
> Because the ldns_dnssec_zone_add_rr does not create a copy of the given
> RR so there is a chance of segmentation faults when using this function
> directly from Python code. Therefore I've added the
> ldns_dnssec_zone_add_rr_() wrapper function which creates a copy of the
> inserted RR into the zone.
>
> I've also fixed the pyldns Makefile testenv target entry which used
> wrong relative path to _ldns.so.
>
> The patch also introduces a new Python3 example file to the SVN
> repository so please don't forget to set the script executable and to
> 'svn add' it.
>
> chmod +x trunk/contrib/python/examples/python3/ldns-signzone.py
> svn add trunk/contrib/python/examples/python3/ldns-signzone.py
>
> I've tested the patch using Python 2.7 and 3.2. As far as I'm concerned,
> the patch does not break any current code.
>
> Best regards,
> K.
>
>
>
> _______________________________________________
> ldns-users mailing list
> ldns-users at open.nlnetlabs.nl
> http://open.nlnetlabs.nl/mailman/listinfo/ldns-users
>
More information about the ldns-users
mailing list