Can not add DMARC/DKIM recs to DNSserver due to python format bug

William Brown william at
Wed May 16 07:26:35 UTC 2018

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.

The simple cause is this:

>>> x
>>> print(x)

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:william at"

As a TXT record, becomes:

"v=DMARC1\\; p=none\\; rua=mailto:william at"

^ 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 :) 

More information about the samba-technical mailing list