[PATCH] Port of dsdb, dsdb_dns and samdb Python modules
Andreas Schneider
asn at samba.org
Sat Feb 10 08:45:24 UTC 2018
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?
How is this supposed to work then? The function is called that way in source4/
dsdb/tests/python/ldap.py too.
Cheers,
Andreash
More information about the samba-technical
mailing list