summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-01-18 21:01:08 -0600
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-01-23 22:41:10 +0100
commit5cdd30011c5b09fd9aac669047e0c2f60f558feb (patch)
tree3acbf41bb1c2756a1603755c4ff86bcd34104005 /source4/scripting
parentce709389e61cdc538f9c071ece37ce97abad9292 (diff)
downloadsamba-5cdd30011c5b09fd9aac669047e0c2f60f558feb.tar.gz
samba-5cdd30011c5b09fd9aac669047e0c2f60f558feb.tar.bz2
samba-5cdd30011c5b09fd9aac669047e0c2f60f558feb.zip
s4-provision: Fixed typos and redundant code
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/provisionbackend.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/scripting/python/samba/provisionbackend.py b/source4/scripting/python/samba/provisionbackend.py
index ae58a16317..8241ed69ff 100644
--- a/source4/scripting/python/samba/provisionbackend.py
+++ b/source4/scripting/python/samba/provisionbackend.py
@@ -704,7 +704,7 @@ class FDSBackend(LDAPBackend):
os.path.join(self.paths.ldapdir, "slapd-samba4", "ldif2db"), "-s", self.sambadn, "-i", self.samba_ldif],
close_fds=True, shell=False)
if retcode != 0:
- raise("ldif2db failed")
+ raise ProvisioningError("ldif2db failed")
def post_setup(self):
ldapi_db = Ldb(self.ldapi_uri, credentials=self.credentials)
@@ -717,16 +717,16 @@ class FDSBackend(LDAPBackend):
dn = str(res[i]["dn"])
ldapi_db.delete(dn)
- aci = """(targetattr = "*") (version 3.0;acl "full access to all by samba-admin";allow (all)(userdn = "ldap:///CN=samba-admin,%s");)""" % self.sambadn
+ aci = """(targetattr = "*") (version 3.0;acl "full access to all by samba-admin";allow (all)(userdn = "ldap:///CN=samba-admin,%s");)""" % self.sambadn
- m = ldb.Message()
- m["aci"] = ldb.MessageElement([aci], ldb.FLAG_MOD_REPLACE, "aci")
+ m = ldb.Message()
+ m["aci"] = ldb.MessageElement([aci], ldb.FLAG_MOD_REPLACE, "aci")
- m.dn = ldb.Dn(1, self.names.domaindn)
- ldapi_db.modify(m)
+ m.dn = ldb.Dn(ldapi_db, self.names.domaindn)
+ ldapi_db.modify(m)
- m.dn = ldb.Dn(1, self.names.configdn)
- ldapi_db.modify(m)
+ m.dn = ldb.Dn(ldapi_db, self.names.configdn)
+ ldapi_db.modify(m)
- m.dn = ldb.Dn(1, self.names.schemadn)
- ldapi_db.modify(m)
+ m.dn = ldb.Dn(ldapi_db, self.names.schemadn)
+ ldapi_db.modify(m)