s3-keytab: fix keytab array NULL termination.

Signed-off-by: Matt Rogers <mrogers@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Add samba.ensure_third_party_module() function, loading external python modules from third_party/ if the system doesn't provide them.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Move dnspython to third_party.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 12 22:40:53 CET 2014 on sn-devel-104
registry: Slightly simplify tdb_data_is_cstr

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib: Slightly simplify strupper_m

toupper_ascii_fast_table is only referenced here, make it static.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov 14 00:31:16 CET 2014 on sn-devel-104
ctdb-daemon: Improve error handling for running event scripts

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Nov 14 03:06:12 CET 2014 on sn-devel-104
lib-pyldb: Avoid SEGFAUL in case we can't convert passed valud to py-String

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
lib-pyldb: Avoid leaking memory in error cases

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
lib-pyldb: Throw exception when we can't create MessageElement object

At the moment we return an error, but no exception and it is
hard to instantly see what the problem is from Python

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
lib-ldb: Check for input parameter when searching attributes by name

This prevents a segfault that is hard to be tracked down from
Python bindings for instance.

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
lib-ldb_ldif: Stop processing if ldb_message element name is NULL

I have hit this while using Python bindings for testing and
forgot to pass 'name' argument to MessageElement constructor
Passing NULL as 'name' is obviously a mistake and this commits
aims to warn about such unintetional mistakes.

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
lib-pyldb: Avoid crash when copying MessageElements between Python Message objects

This patch allows for following snipets in Python:
  res = ldb.search(...)
  m_from = res[0]
  m_to = Message()
  m_to.add(m_from["attrName"])

The problem previously is that we are trying to reference a
ldb_message_element that may not be a memory context on its own.
For instance, when search request from above example returns
Messages with more than one attribute, this leads immediately
to "Bad talloc magic value" crash, every message element beside
the first one is not a memory context

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>