[PATCH] Port of dsdb, dsdb_dns and samdb Python modules
abartlet at samba.org
Sat Feb 10 08:53:51 UTC 2018
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
> > 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 http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical