Merge branch 'master' of ssh://git.samba.org/data/git/samba
authorJelmer Vernooij <jelmer@samba.org>
Wed, 25 Feb 2009 11:49:37 +0000 (12:49 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 25 Feb 2009 11:49:37 +0000 (12:49 +0100)
Conflicts:
source4/scripting/python/samba/provision.py

source4/scripting/python/samba/__init__.py
source4/scripting/python/samba/provision.py
source4/scripting/python/samba/samdb.py
source4/scripting/python/samba/tests/__init__.py
source4/scripting/python/samba/tests/provision.py

index e9fc26af20b846a470d3994807f260a4dfc799a1..a49e6e1eadb7460476b7cc2bb5838465574c473f 100644 (file)
@@ -223,7 +223,7 @@ def check_all_substituted(text):
     :param text: The text to search for substitution variables
     """
     if not "${" in text:
-       return
+        return
     
     var_start = text.find("${")
     var_end = text.find("}", var_start)
index c817bffbddd91f42937fffd8fa7dc99c72dc0235..0aa84ec6db7fbe07e2488244c4cec0beee005207 100644 (file)
@@ -52,7 +52,7 @@ def find_setup_dir():
     """Find the setup directory used by provision."""
     dirname = os.path.dirname(__file__)
     if "/site-packages/" in dirname:
-        prefix = dirname[:dirname.index("/site-packages/")]
+        prefix = "/".join(dirname[:dirname.index("/site-packages/")].split("/")[:-2])
         for suffix in ["share/setup", "share/samba/setup", "setup"]:
             ret = os.path.join(prefix, suffix)
             if os.path.isdir(ret):
@@ -1368,7 +1368,7 @@ def provision_backend(setup_dir=None, message=None,
                                                                         "MMRDN": names.domaindn,
                                                                         "LDAPSERVER" : url,
                                                                         "MMR_PASSWORD": mmr_pass })
-       # olc = yes?
+        # olc = yes?
         olc_config_pass = ""
         olc_config_acl = ""
         olc_syncrepl_config = ""
index 9cc55e5629e829b5dd3b7f7af6a9e453f0e29aba..614970d3ec5b6bfadd144853fd29d99ebfcb76ef 100644 (file)
@@ -201,11 +201,11 @@ userAccountControl: %u
         glue.dsdb_attach_schema_from_ldif_file(self, pf, df)
 
     def set_invocation_id(self, invocation_id):
-       """Set the invocation id for this SamDB handle.
-       
-       :param invocation_id: GUID of the invocation id.
-       """
-       glue.dsdb_set_ntds_invocation_id(self, invocation_id)
+        """Set the invocation id for this SamDB handle.
+        
+        :param invocation_id: GUID of the invocation id.
+        """
+        glue.dsdb_set_ntds_invocation_id(self, invocation_id)
 
     def setexpiry(self, user, expiry_seconds, noexpiry):
         """Set the password expiry for a user
index d827bfa0044926e4c6e9d56052392fab03e078b4..b342b93c498d008f25f7ca7b7287af31ec5bc595 100644 (file)
@@ -70,8 +70,8 @@ class SubstituteVarTestCase(unittest.TestCase):
                 samba.substitute_var("foo ${bla} gsff", {"bar": "bla"}))
                 
     def test_check_all_substituted(self):
-       samba.check_all_substituted("nothing to see here")
-       self.assertRaises(Exception, samba.check_all_substituted, "Not subsituted: ${FOOBAR}")
+        samba.check_all_substituted("nothing to see here")
+        self.assertRaises(Exception, samba.check_all_substituted, "Not subsituted: ${FOOBAR}")
 
 
 class LdbExtensionTests(TestCaseInTempDir):
index 352357f6942046f25de75f35e9eb84fa811419fb..fdac9d4ea2193f877a9a981eadecad87fa8c33ac 100644 (file)
@@ -56,7 +56,7 @@ class ProvisionTestCase(samba.tests.TestCaseInTempDir):
                            machinepass="machinepass", dnsdomain="example.com")
             self.assertEquals(1, 
                     len(secrets_ldb.search("samAccountName=krbtgt,flatname=EXAMPLE,CN=Principals")))
-           self.assertEquals("keytab.path",
+            self.assertEquals("keytab.path",
                     secrets_ldb.searchone(basedn="flatname=EXAMPLE,CN=primary domains", 
                                           expression="(privateKeytab=*)", 
                                           attribute="privateKeytab"))