summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-08-28 11:19:04 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-08-28 09:49:39 +0200
commit9e441c4ed98b1a2b83069ad5fa54b2b30dc75598 (patch)
tree2e448d88f07b634df03aeba33b2c992f4559b4e7 /source4/scripting/python
parentdd21bb0b728a9c6dfc70f1785a642474fe7bd78b (diff)
downloadsamba-9e441c4ed98b1a2b83069ad5fa54b2b30dc75598.tar.gz
samba-9e441c4ed98b1a2b83069ad5fa54b2b30dc75598.tar.bz2
samba-9e441c4ed98b1a2b83069ad5fa54b2b30dc75598.zip
s3-classicupgrade: Fix import from ldap
We must not reference result before provision(), and do not need session_info and lp for reading a normal ldap backend anyway. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Aug 28 09:49:39 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/upgrade.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index 19a42c786a..d3f0b8de16 100644
--- a/source4/scripting/python/samba/upgrade.py
+++ b/source4/scripting/python/samba/upgrade.py
@@ -775,13 +775,13 @@ Please fix this account before attempting to upgrade again
pgids = {}
if ldap:
creds = Credentials()
- creds.guess(s3param.get_context())
+ creds.guess(samba3.lp)
creds.set_bind_dn(ldapuser)
creds.set_password(ldappass)
urls = samba3.lp.get("passdb backend").split(":",1)[1].strip('"')
for url in urls.split():
try:
- ldb_object = Ldb(url, session_info=system_session(result.lp), credentials=creds, lp=result.lp)
+ ldb_object = Ldb(url, credentials=creds)
except ldb.LdbError, e:
logger.warning("Could not open ldb connection to %s, the error message is: %s", url, e)
else: