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

Andreas Schneider asn at samba.org
Wed Feb 7 07:42:20 UTC 2018


On Wednesday, 31 January 2018 08:33:44 CET Andreas Schneider via samba-
technical wrote:
> On Wednesday, 31 January 2018 00:31:34 CET Andrew Bartlett via
> samba-technical
> wrote:
> > On Tue, 2018-01-30 at 19:35 +0100, Lumir Balhar via samba-technical
> > 
> > wrote:
> > >          # Create a test user
> > > 
> > > -        user_name = "samdb-testuser"
> > > +        user_name = "dsdb-user-" + str(uuid.uuid4())
> > > 
> > >          user_pass = samba.generate_random_password(32, 32)
> > >          user_description = "Test user for dsdb test"
> > 
> > Please don't do this (at least not with a UUID).  The issue with this
> > pattern is that Samba doesn't currently enforce length constraints but
> > if used against windows that breaks.  (Yes, we should enforce the
> > length constraints).
> 
> Ok, I've changed it to:
> 
> user_name = "dsdb-user-" + str(uuid.uuid4().hex[0:6])
> 
> to only use 6 random chars and added addCleanup() too. We should do that for
> every test!

Ping!

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org





More information about the samba-technical mailing list