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

Lumir Balhar lbalhar at redhat.com
Mon Feb 12 11:33:40 UTC 2018


On 02/10/2018 09:53 AM, Andrew Bartlett via samba-technical wrote:
> On Sat, 2018-02-10 at 09:45 +0100, Andreas Schneider wrote:
>> On Friday, 9 February 2018 21:02:37 CET Lumir Balhar via samba-technical
>> wrote:
>>> 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?
>> What is the right fix for:
>>
>> +    def tearDown(self):
>> +        delete_force(self.samdb, self.account_dn)
>>
>> Andrew said that this does not work. Why?
> What I was trying to say is that while harmless we shouldn't need both
> that and the addCleanup.  To be clear, this is at the nit-pick stage
> and with the other stuff sorted out I'm of a mind to just review the
> lot and get it in once back in the office on Monday.
>
> If you get a revised patch that drops that hunk before then even
> better, just because we copy-paste so much in our test code and setting
> a good pattern would be a good idea.
>
> Thanks for all your efforts improving this in Samba.
>
> Andrew Bartlett
Hello.

I've rebased patchset to the top of the master branch and removed the 
mentioned teardown method from tests/dsdb.py in the first patch.

 From my point of view the patchset is ready to be merged.

Have a nice day.
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/20180212/e90c92e3/0007-python-tests-Make-tests-of-dsdb-Python-module-Python.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/20180212/e90c92e3/0006-python-Port-dsdb-module-to-Python-3-compatible-form.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/20180212/e90c92e3/0005-python-Port-samdb-module-to-Python-3-compatible-form.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/20180212/e90c92e3/0004-python-Add-text_type-Python-2-3-compatible-function-.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/20180212/e90c92e3/0003-python-Port-dsdb_dns-module-to-Python-3-compatible-f.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/20180212/e90c92e3/0002-python-Convert-base64-encoded-password-to-utf-8.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-python-Generate-random-test-usernames.patch
Type: text/x-patch
Size: 1544 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180212/e90c92e3/0001-python-Generate-random-test-usernames.bin>


More information about the samba-technical mailing list