[PATCH] fix for bug 12292

Rowland Penny repenny241155 at gmail.com
Wed Sep 28 07:10:08 UTC 2016


On Wed, 28 Sep 2016 11:18:23 +1300
Douglas Bagnall <douglas.bagnall at catalyst.net.nz> wrote:

> On 28/09/16 10:33, Rowland Penny wrote:
> >>>  python/samba/samdb.py | 15 ++++-----------
> >>>  1 file changed, 4 insertions(+), 11 deletions(-)
> >>>
> >>> diff --git a/python/samba/samdb.py b/python/samba/samdb.py
> >>> index 3d7ea3e..42b39f3 100644
> >>> --- a/python/samba/samdb.py
> >>> +++ b/python/samba/samdb.py
> >>> @@ -463,22 +463,15 @@ member: %s
> >>>          else:
> >>>              self.transaction_commit()
> >>>  
> >>> +    def deleteobject(self, object_dn):
> >>> +        """Deletes an AD object
> >>>  
> >>> -    def deleteuser(self, username):
> >>> -        """Deletes a user
> >>
> >> Won't this also break python/samba/tests/samba_tool/rodc.py?
> > 
> > Why ?? can you point me to documentation that backs up this
> > question.
> 
> It uses Samdb.deleteuser, which this patch removes. Documentation of
> that would be a surprise.
> 
> `git grep` is useful in this situation (though not necessarily
> sufficient, due to generated code).
> 
> cheers,
> Douglas

As far as I can see, it uses ldb.deleteuser 

    def tearDown(self):
        super(RodcCmdTestCase, self).tearDown()
        self.ldb.deleteuser("sambatool1")
        self.ldb.deleteuser("sambatool2")
        self.ldb.deleteuser("sambatool3")
        self.ldb.deleteuser("sambatool4")
        self.ldb.deleteuser("sambatool5")
        self.ldb.deleteuser("sambatool6")
        (result, out, err) = self.runsubcmd("drs", "replicate", "--local", "unused",
                                            os.environ["DC_SERVER"],
                                            self.base_dn)

But I will test it and if required, fix it.

Rowland



More information about the samba-technical mailing list