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

Alexander Bokovoy ab at samba.org
Tue Feb 20 20:01:27 UTC 2018


On ma, 12 helmi 2018, Lumir Balhar via samba-technical wrote:
> 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.
RB+ from my side. I'll leave it to Andrew to do the final review.

-- 
/ Alexander Bokovoy



More information about the samba-technical mailing list