diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-16 15:50:02 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:50:35 +0100 |
commit | 0a01f50f9802ecfae430d2218af3b96a3682218d (patch) | |
tree | 853f59e877f3433cdfaafc94ce5eae140ead38e4 /source4/scripting/python/samba | |
parent | 1afe0549163bbc639ae1a030239c9ebcd1b922bf (diff) | |
download | samba-0a01f50f9802ecfae430d2218af3b96a3682218d.tar.gz samba-0a01f50f9802ecfae430d2218af3b96a3682218d.tar.xz samba-0a01f50f9802ecfae430d2218af3b96a3682218d.zip |
r26475: Add ldb.set_credentials function.
(This used to be commit dbebb4ef477d2c8de7b8d1e5cde9b9dada47044f)
Diffstat (limited to 'source4/scripting/python/samba')
-rw-r--r-- | source4/scripting/python/samba/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index 2c51440b0c..29d322e2fc 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -19,10 +19,9 @@ # import os -from misc import ldb_set_credentials def _in_source_tree(): - print os.path.exists("%s/../../../samba4-skip" % os.path.dirname(__file__)) + return os.path.exists("%s/../../../samba4-skip" % os.path.dirname(__file__)) # When running, in-tree, make sure bin/python is in the PYTHONPATH if _in_source_tree(): @@ -30,6 +29,10 @@ if _in_source_tree(): dir = os.path.dirname(__file__) sys.path.append("%s/../../../bin/python" % os.path.dirname(__file__)) +import misc +import ldb +ldb.ldb.set_credentials = misc.ldb_set_credentials + def Ldb(url, session_info=None, credentials=None, modules_dir=None): """Open a Samba Ldb file. |