Patch: Prevent a crash in Python modules

Richard Sharpe realrichardsharpe at
Tue Aug 25 16:33:09 UTC 2015

On Mon, Aug 24, 2015 at 8:57 PM, Richard Sharpe
<realrichardsharpe at> wrote:
> Hi folks,
> Attached is the patch I sent in last week with some changes based on
> Jeremy's feedback.

This is the result of a test with the change. Rather than crashing
with a segfault, it now does this (actually, with my original patch.
Will test the new one as well):

>>> ldb_obj=Ldb('ldap://', lp=lp, credentials=creds)
Failed to bind - LDAP client internal error: NT_STATUS_INVALID_PARAMETER
Failed to connect to 'ldap://' with backend 'ldap': (null)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/samba/", line
114, in __init__
    self.connect(url, flags, options)
_ldb.LdbError: (1, None)

Richard Sharpe

More information about the samba-technical mailing list