[PATCH] Port of dsdb, dsdb_dns and samdb Python modules

Lumir Balhar lbalhar at redhat.com
Fri Feb 9 20:02:37 UTC 2018


On 02/09/2018 08:35 PM, Douglas Bagnall wrote:
> On 10/02/18 08:26, Andrew Bartlett wrote:
>
>> For those preparing the final patch, just remember that the goal is to
>> have UTF-16-LE " (double-quote) chars around the UTF-16-LE password in
>> the actual LDAP attribute being set.
>>
>> that is, presumably, untested:
>>
>> +            if not PY3 and isinstance(password, str):
>> +                password = unicode(password, 'utf-8')
>> +            pw = (u'"%s"' % password).encode('utf-16-le')
>>
> Oh, yeah, that is what I *meant* to say.
>
> Douglas
I was working on that in parallel with you and I think I have a final 
solution without PY3 condition. Moreover, it is compatible with Python ≥ 
2.6.

New patchset attached. What do you think about it?

Have a nice weekend.
Lumír
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-python-tests-Make-tests-of-dsdb-Python-module-Python.patch
Type: text/x-patch
Size: 5923 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180209/760cc507/0007-python-tests-Make-tests-of-dsdb-Python-module-Python-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-python-Port-dsdb-module-to-Python-3-compatible-form.patch
Type: text/x-patch
Size: 8339 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180209/760cc507/0006-python-Port-dsdb-module-to-Python-3-compatible-form-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-python-Port-samdb-module-to-Python-3-compatible-form.patch
Type: text/x-patch
Size: 3471 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180209/760cc507/0005-python-Port-samdb-module-to-Python-3-compatible-form-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-python-Add-text_type-Python-2-3-compatible-function-.patch
Type: text/x-patch
Size: 779 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180209/760cc507/0004-python-Add-text_type-Python-2-3-compatible-function--0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-python-Port-dsdb_dns-module-to-Python-3-compatible-f.patch
Type: text/x-patch
Size: 2366 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180209/760cc507/0003-python-Port-dsdb_dns-module-to-Python-3-compatible-f-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-python-Convert-base64-encoded-password-to-utf-8.patch
Type: text/x-patch
Size: 841 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180209/760cc507/0002-python-Convert-base64-encoded-password-to-utf-8-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-python-Generate-random-test-usernames.patch
Type: text/x-patch
Size: 1594 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180209/760cc507/0001-python-Generate-random-test-usernames-0001.bin>


More information about the samba-technical mailing list