mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema
This commit is contained in:
@ -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)
|
||||
|
@ -53,7 +53,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):
|
||||
@ -1132,7 +1132,8 @@ def provision(setup_dir, message, session_info,
|
||||
message("NetBIOS Domain: %s" % names.domain)
|
||||
message("DNS Domain: %s" % names.dnsdomain)
|
||||
message("DOMAIN SID: %s" % str(domainsid))
|
||||
message("Admin password: %s" % adminpass)
|
||||
if samdb_fill == FILL_FULL:
|
||||
message("Admin password: %s" % adminpass)
|
||||
|
||||
result = ProvisionResult()
|
||||
result.domaindn = domaindn
|
||||
@ -1365,7 +1366,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 = ""
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -49,7 +49,7 @@ class RpcEchoTests(RpcInterfaceTestCase):
|
||||
surrounding_struct.x = 4
|
||||
surrounding_struct.surrounding = [1,2,3,4]
|
||||
y = self.conn.TestSurrounding(surrounding_struct)
|
||||
self.assertEquals(8 * [0], y.surrounding)
|
||||
self.assertEquals(4 * [0], y.surrounding)
|
||||
|
||||
def test_manual_request(self):
|
||||
self.assertEquals("\x01\x00\x00\x00", self.conn.request(0, chr(0) * 4))
|
||||
|
@ -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"))
|
||||
|
Reference in New Issue
Block a user