summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-02 15:43:40 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-06 15:02:38 +1000
commitc091a92be51e8c14bf0b51ab83319fbcb704c91f (patch)
tree24e7f44491a9cf328e1622f46c2558d6476dedeb /source4/scripting
parent6bf88222cc00ac765929ed6e844552a9a776109a (diff)
downloadsamba-c091a92be51e8c14bf0b51ab83319fbcb704c91f.tar.gz
samba-c091a92be51e8c14bf0b51ab83319fbcb704c91f.tar.bz2
samba-c091a92be51e8c14bf0b51ab83319fbcb704c91f.zip
s4-param Remove 'sam database' parameter
This now just relies on the private dir parameter, which remains. Andrew Bartlett
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate2
-rwxr-xr-xsource4/scripting/bin/samba_spnupdate4
-rw-r--r--source4/scripting/python/samba/hostconfig.py2
-rw-r--r--source4/scripting/python/samba/provision/__init__.py5
-rw-r--r--source4/scripting/python/samba/samdb.py2
5 files changed, 7 insertions, 8 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index c82e06bb6f..0a13dd7c9b 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -222,7 +222,7 @@ def get_subst_vars():
global lp, am_rodc
vars = {}
- samdb = SamDB(url=lp.get("sam database"), session_info=system_session(),
+ samdb = SamDB(url=lp.samdb_url(), session_info=system_session(),
lp=lp)
vars['DNSDOMAIN'] = lp.get('realm').lower()
diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate
index 1794f2bd26..fe3fcfc675 100755
--- a/source4/scripting/bin/samba_spnupdate
+++ b/source4/scripting/bin/samba_spnupdate
@@ -103,9 +103,9 @@ try:
else:
credentials = None
- samdb = SamDB(url=lp.get("sam database"), session_info=system_session(), credentials=credentials, lp=lp)
+ samdb = SamDB(url=lp.samdb_url(), session_info=system_session(), credentials=credentials, lp=lp)
except ldb.LdbError, (num, msg):
- print("Unable to open sam database %s : %s" % (lp.get("sam database"), msg))
+ print("Unable to open sam database %s : %s" % (lp.samdb_url(), msg))
sys.exit(1)
diff --git a/source4/scripting/python/samba/hostconfig.py b/source4/scripting/python/samba/hostconfig.py
index 3e6dc6b1dd..c50b944c98 100644
--- a/source4/scripting/python/samba/hostconfig.py
+++ b/source4/scripting/python/samba/hostconfig.py
@@ -37,7 +37,7 @@ class Hostconfig(object):
:param session_info: Session info to use
:param credentials: Credentials to access the SamDB with
"""
- return SamDB(url=self.lp.get("sam database"),
+ return SamDB(url=self.lp.samdb_url(),
session_info=session_info, credentials=credentials,
lp=self.lp)
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index f987fb8ef3..fffd352071 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -432,7 +432,7 @@ def check_install(lp, session_info, credentials):
"""
if lp.get("realm") == "":
raise Exception("Realm empty")
- samdb = Ldb(lp.get("sam database"), session_info=session_info,
+ samdb = Ldb(lp.samdb_url(), session_info=session_info,
credentials=credentials, lp=lp)
if len(samdb.search("(cn=Administrator)")) != 1:
raise ProvisioningError("No administrator account found")
@@ -517,8 +517,7 @@ def provision_paths_from_lp(lp, dnsdomain):
paths.keytab = "secrets.keytab"
paths.shareconf = os.path.join(paths.private_dir, "share.ldb")
- paths.samdb = os.path.join(paths.private_dir,
- lp.get("sam database") or "samdb.ldb")
+ paths.samdb = os.path.join(paths.private_dir, "sam.ldb")
paths.idmapdb = os.path.join(paths.private_dir,
lp.get("idmap database") or "idmap.ldb")
paths.secrets = os.path.join(paths.private_dir,
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py
index a5c627e5b5..55f3536c27 100644
--- a/source4/scripting/python/samba/samdb.py
+++ b/source4/scripting/python/samba/samdb.py
@@ -46,7 +46,7 @@ class SamDB(samba.Ldb):
if not auto_connect:
url = None
elif url is None and lp is not None:
- url = lp.get("sam database")
+ url = lp.samdb_url()
super(SamDB, self).__init__(url=url, lp=lp, modules_dir=modules_dir,
session_info=session_info, credentials=credentials, flags=flags,