Can not add DMARC/DKIM recs to DNSserver due to python format bug
(too old to reply)
William Brown via samba-technical
2018-05-16 07:26:35 UTC
Hi there,

I need some help on how to debug an issue with python/c_python, and I'm
a bit stumped on where to look next.

In some cases python is emitting an escaped string, in others it's not.
For the DNS server this is a blocking issue as:

"v=DMARC1\; p=none\; rua=mailto:***@blackhats.net.au"

As a TXT record, becomes:

"v=DMARC1\\; p=none\\; rua=mailto:***@blackhats.net.au"

^ As obvserved from dig @ad.dc .... TXT. We have python escaping state
going into the dns objects and responses rather than the raw string.

So somewhere in the dnsserver stack to perform a samba-tool dns
add/update the escaped string is being used rather than the "raw

I'm a bit stuck on where to investigate this next, because I suspect
the issue is happening in ./bin/default/librpc/gen_ndr/py_dnsserver.c
when the python string is assigned to the c_python object.

Any advice on where to go next would be great so that I can work on
this issue in the next few days



PS: Yes Andrew, I'll fix those other patches up first before I start
new-fun-tasks :)