diff options
24 files changed, 66 insertions, 66 deletions
diff --git a/python/samba/ms_schema.py b/python/samba/ms_schema.py index 61e2ade6950..cd7e5fb12f3 100644 --- a/python/samba/ms_schema.py +++ b/python/samba/ms_schema.py @@ -305,7 +305,7 @@ def read_ms_schema(attr_file, classes_file, dump_attributes = True, dump_classes classes_ldif = "" if dump_attributes: - attr_ldif = __parse_schema_file(attr_file, "attributeSchema") + attr_ldif = __parse_schema_file(attr_file, "attributeSchema") if dump_classes: classes_ldif = __parse_schema_file(classes_file, "classSchema") diff --git a/python/samba/netcmd/delegation.py b/python/samba/netcmd/delegation.py index d8b7a79619e..c8275f4156f 100644 --- a/python/samba/netcmd/delegation.py +++ b/python/samba/netcmd/delegation.py @@ -78,7 +78,7 @@ class cmd_delegation_show(Command): uac = int(res[0].get("userAccountControl")[0]) allowed = res[0].get("msDS-AllowedToDelegateTo") - self.outf.write("Account-DN: %s\n" % str(res[0].dn)) + self.outf.write("Account-DN: %s\n" % str(res[0].dn)) self.outf.write("UF_TRUSTED_FOR_DELEGATION: %s\n" % bool(uac & dsdb.UF_TRUSTED_FOR_DELEGATION)) self.outf.write("UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION: %s\n" % diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py index bcf5d4ddb08..e8c2e1de9bb 100644 --- a/python/samba/netcmd/domain.py +++ b/python/samba/netcmd/domain.py @@ -2324,7 +2324,7 @@ class cmd_domain_trust_create(DomainTrustCommand): enc_types.enc_types = security.KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96 enc_types.enc_types |= security.KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96 - local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION + local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION local_policy_access |= lsa.LSA_POLICY_TRUST_ADMIN local_policy_access |= lsa.LSA_POLICY_CREATE_SECRET @@ -2810,14 +2810,14 @@ class cmd_domain_trust_delete(DomainTrustCommand): def run(self, domain, sambaopts=None, localdcopts=None, credopts=None, versionopts=None, delete_location=None): - local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION + local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION local_policy_access |= lsa.LSA_POLICY_TRUST_ADMIN local_policy_access |= lsa.LSA_POLICY_CREATE_SECRET if delete_location == "local": remote_policy_access = None else: - remote_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION + remote_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION remote_policy_access |= lsa.LSA_POLICY_TRUST_ADMIN remote_policy_access |= lsa.LSA_POLICY_CREATE_SECRET @@ -2971,7 +2971,7 @@ class cmd_domain_trust_validate(DomainTrustCommand): def run(self, domain, sambaopts=None, versionopts=None, credopts=None, localdcopts=None, validate_location=None): - local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION + local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION local_server = self.setup_local_server(sambaopts, localdcopts) try: @@ -3378,7 +3378,7 @@ class cmd_domain_trust_namespaces(DomainTrustCommand): continue raise CommandError("value[%s] specified for --enable-sid and --disable-sid" % e) - local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION + local_policy_access = lsa.LSA_POLICY_VIEW_LOCAL_INFORMATION if require_update: local_policy_access |= lsa.LSA_POLICY_TRUST_ADMIN diff --git a/python/samba/netcmd/ldapcmp.py b/python/samba/netcmd/ldapcmp.py index 1f662d57ae3..88fe857c825 100644 --- a/python/samba/netcmd/ldapcmp.py +++ b/python/samba/netcmd/ldapcmp.py @@ -454,7 +454,7 @@ class LDAPObject(object): # Two domains - two domain controllers if self.two_domains: - self.ignore_attributes += [ + self.ignore_attributes += [ "objectCategory", "objectGUID", "objectSid", "whenCreated", "whenChanged", "pwdLastSet", "uSNCreated", "creationTime", "modifiedCount", "priorSetTime", "rIDManagerReference", diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py index 0baffbcb1e5..868f23c63b1 100644 --- a/python/samba/netcmd/user.py +++ b/python/samba/netcmd/user.py @@ -2065,7 +2065,7 @@ samba-tool user syncpasswords --terminate \\ if self.current_pid is not None: log_msg("currentPid: %d\n" % self.current_pid) - modify_ldif = "dn: %s\n" % (self.cache_dn) + modify_ldif = "dn: %s\n" % (self.cache_dn) modify_ldif += "changetype: modify\n" modify_ldif += "replace: currentPid\n" if self.current_pid is not None: @@ -2082,7 +2082,7 @@ samba-tool user syncpasswords --terminate \\ self.dirsync_controls = [str(res_controls[0]),"extended_dn:1:0"] log_msg("dirsyncControls: %r\n" % self.dirsync_controls) - modify_ldif = "dn: %s\n" % (self.cache_dn) + modify_ldif = "dn: %s\n" % (self.cache_dn) modify_ldif += "changetype: modify\n" modify_ldif += "replace: dirsyncControl\n" modify_ldif += "dirsyncControl: %s\n" % (self.dirsync_controls[0]) @@ -2129,7 +2129,7 @@ samba-tool user syncpasswords --terminate \\ add_ldif += "currentTime: %s\n" % ldb.timestring(int(time.time())) self.cache.add_ldif(add_ldif) else: - modify_ldif = "dn: %s\n" % (dn) + modify_ldif = "dn: %s\n" % (dn) modify_ldif += "changetype: modify\n" modify_ldif += "replace: lastCookie\n" modify_ldif += "lastCookie: %s\n" % (lastCookie) diff --git a/python/samba/ntacls.py b/python/samba/ntacls.py index 5c561e8bcab..e64892d45ca 100644 --- a/python/samba/ntacls.py +++ b/python/samba/ntacls.py @@ -295,7 +295,7 @@ def dsacl2fsacl(dssddl, sid, as_sddl=True): if str(ace.trustee) == security.SID_CREATOR_OWNER: # For Creator/Owner the IO flag is set as this ACE has only a sense for child objects ace.flags = ace.flags | security.SEC_ACE_FLAG_INHERIT_ONLY - ace.access_mask = ldapmask2filemask(ace.access_mask) + ace.access_mask = ldapmask2filemask(ace.access_mask) fdescr.dacl_add(ace) if not as_sddl: diff --git a/python/samba/provision/backend.py b/python/samba/provision/backend.py index 35743355819..53b03e37acf 100644 --- a/python/samba/provision/backend.py +++ b/python/samba/provision/backend.py @@ -283,7 +283,7 @@ class LDAPBackend(ProvisionBackend): count = count + 1 if count > 15: - self.logger.error("Could not connect to slapd started with: %s" % "\'" + "\' \'".join(self.slapd_provision_command) + "\'") + self.logger.error("Could not connect to slapd started with: %s" % "\'" + "\' \'".join(self.slapd_provision_command) + "\'") raise ProvisioningError("slapd never accepted a connection within 15 seconds of starting") self.logger.error("Could not start slapd with: %s" % "\'" + "\' \'".join(self.slapd_provision_command) + "\'") @@ -592,7 +592,7 @@ class OpenLDAPBackend(LDAPBackend): retcode = subprocess.call(slapd_cmd, close_fds=True, shell=False) if retcode != 0: - self.logger.error("conversion from slapd.conf to cn=config failed slapd started with: %s" % "\'" + "\' \'".join(slapd_cmd) + "\'") + self.logger.error("conversion from slapd.conf to cn=config failed slapd started with: %s" % "\'" + "\' \'".join(slapd_cmd) + "\'") raise ProvisioningError("conversion from slapd.conf to cn=config failed") if not os.path.exists(os.path.join(self.olcdir, "cn=config.ldif")): diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py index c716df4d7dc..3657c0cf4a9 100644 --- a/python/samba/provision/sambadns.py +++ b/python/samba/provision/sambadns.py @@ -63,7 +63,7 @@ from samba.samdb import get_default_backend_store def get_domainguid(samdb, domaindn): res = samdb.search(base=domaindn, scope=ldb.SCOPE_BASE, attrs=["objectGUID"]) - domainguid = str(ndr_unpack(misc.GUID, res[0]["objectGUID"][0])) + domainguid = str(ndr_unpack(misc.GUID, res[0]["objectGUID"][0])) return domainguid diff --git a/python/samba/tests/dcerpc/raw_protocol.py b/python/samba/tests/dcerpc/raw_protocol.py index 2a1a87be492..006195035c6 100755 --- a/python/samba/tests/dcerpc/raw_protocol.py +++ b/python/samba/tests/dcerpc/raw_protocol.py @@ -1330,7 +1330,7 @@ class TestDCERPC_BIND(RawDCERPCTest): features1 = 0 btf1 = base.bind_time_features_syntax(features1) - features2 = dcerpc.DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN + features2 = dcerpc.DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN features2 |= dcerpc.DCERPC_BIND_TIME_SECURITY_CONTEXT_MULTIPLEXING btf2 = base.bind_time_features_syntax(features2) diff --git a/python/samba/tests/dcerpc/raw_testcase.py b/python/samba/tests/dcerpc/raw_testcase.py index 260abdcc487..7726f9b3f7b 100644 --- a/python/samba/tests/dcerpc/raw_testcase.py +++ b/python/samba/tests/dcerpc/raw_testcase.py @@ -340,7 +340,7 @@ class RawDCERPCTest(TestCase): else: auth_info="" - pfc_flags = samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_FIRST + pfc_flags = samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_FIRST pfc_flags |= samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_LAST if object is not None: pfc_flags |= samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_OBJECT_UUID diff --git a/python/samba/tests/netbios.py b/python/samba/tests/netbios.py index 65ec5f1d7d1..929c36e9ef2 100644 --- a/python/samba/tests/netbios.py +++ b/python/samba/tests/netbios.py @@ -23,7 +23,7 @@ class NetBiosTests(samba.tests.TestCase): super(NetBiosTests, self).setUp() self.n = netbios.Node() self.ifc = os.environ["SERVER_IP"] - self.dc = os.environ["DC_NETBIOSNAME"] + self.dc = os.environ["DC_NETBIOSNAME"] def tearDown(self): super(NetBiosTests, self).tearDown() def test_query_name(self): diff --git a/python/samba/tests/samba_tool/group.py b/python/samba/tests/samba_tool/group.py index 6753691fd9c..bc966ff3e22 100644 --- a/python/samba/tests/samba_tool/group.py +++ b/python/samba/tests/samba_tool/group.py @@ -81,7 +81,7 @@ class GroupCmdTestCase(SambaToolCmdTest): # test adding groups for group in self.groups: - (result, out, err) = self.runsubcmd("group", "add", group["name"], + (result, out, err) = self.runsubcmd("group", "add", group["name"], "--description=%s" % group["description"], "-H", "ldap://%s" % os.environ["DC_SERVER"], "-U%s%%%s" % (os.environ["DC_USERNAME"], @@ -140,7 +140,7 @@ class GroupCmdTestCase(SambaToolCmdTest): def test_move(self): full_ou_dn = str(self.samdb.normalize_dn_in_domain("OU=movetest")) - (result, out, err) = self.runsubcmd("ou", "create", full_ou_dn) + (result, out, err) = self.runsubcmd("ou", "create", full_ou_dn) self.assertCmdSuccess(result, out, err) self.assertEquals(err, "", "There shouldn't be any error message") self.assertIn('Created ou "%s"' % full_ou_dn, out) @@ -153,7 +153,7 @@ class GroupCmdTestCase(SambaToolCmdTest): (group["name"], full_ou_dn), out) # Should fail as groups objects are in OU - (result, out, err) = self.runsubcmd("ou", "delete", full_ou_dn) + (result, out, err) = self.runsubcmd("ou", "delete", full_ou_dn) self.assertCmdFail(result) self.assertIn(("subtree_delete: Unable to delete a non-leaf node " "(it has %d children)!") % len(self.groups), err) diff --git a/python/samba/tests/samba_tool/ntacl.py b/python/samba/tests/samba_tool/ntacl.py index c01d5acd73f..c84c60ee4fb 100644 --- a/python/samba/tests/samba_tool/ntacl.py +++ b/python/samba/tests/samba_tool/ntacl.py @@ -29,14 +29,14 @@ class NtACLCmdSysvolTestCase(SambaToolCmdTest): def test_ntvfs(self): - (result, out, err) = self.runsubcmd("ntacl", "sysvolreset", + (result, out, err) = self.runsubcmd("ntacl", "sysvolreset", "--use-ntvfs") self.assertCmdSuccess(result, out, err) self.assertEquals(out,"","Shouldn't be any output messages") self.assertIn("Please note that POSIX permissions have NOT been changed, only the stored NT ACL", err) def test_s3fs(self): - (result, out, err) = self.runsubcmd("ntacl", "sysvolreset", + (result, out, err) = self.runsubcmd("ntacl", "sysvolreset", "--use-s3fs") self.assertCmdSuccess(result, out, err) @@ -44,19 +44,19 @@ class NtACLCmdSysvolTestCase(SambaToolCmdTest): self.assertEquals(out,"","Shouldn't be any output messages") def test_ntvfs_check(self): - (result, out, err) = self.runsubcmd("ntacl", "sysvolreset", + (result, out, err) = self.runsubcmd("ntacl", "sysvolreset", "--use-ntvfs") self.assertCmdSuccess(result, out, err) self.assertEquals(out,"","Shouldn't be any output messages") self.assertIn("Please note that POSIX permissions have NOT been changed, only the stored NT ACL", err) # Now check they were set correctly - (result, out, err) = self.runsubcmd("ntacl", "sysvolcheck") + (result, out, err) = self.runsubcmd("ntacl", "sysvolcheck") self.assertCmdSuccess(result, out, err) self.assertEquals(err,"","Shouldn't be any error messages") self.assertEquals(out,"","Shouldn't be any output messages") def test_s3fs_check(self): - (result, out, err) = self.runsubcmd("ntacl", "sysvolreset", + (result, out, err) = self.runsubcmd("ntacl", "sysvolreset", "--use-s3fs") self.assertCmdSuccess(result, out, err) @@ -64,7 +64,7 @@ class NtACLCmdSysvolTestCase(SambaToolCmdTest): self.assertEquals(out,"","Shouldn't be any output messages") # Now check they were set correctly - (result, out, err) = self.runsubcmd("ntacl", "sysvolcheck") + (result, out, err) = self.runsubcmd("ntacl", "sysvolcheck") self.assertCmdSuccess(result, out, err) self.assertEquals(err,"","Shouldn't be any error messages") self.assertEquals(out,"","Shouldn't be any output messages") @@ -80,7 +80,7 @@ class NtACLCmdGetSetTestCase(SambaToolCmdTest): tempf = os.path.join(path,"pytests"+str(int(100000*random.random()))) open(tempf, 'w').write("empty") - (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf, + (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf, "--use-ntvfs") self.assertCmdSuccess(result, out, err) self.assertEquals(out,"","Shouldn't be any output messages") @@ -91,7 +91,7 @@ class NtACLCmdGetSetTestCase(SambaToolCmdTest): tempf = os.path.join(path,"pytests"+str(int(100000*random.random()))) open(tempf, 'w').write("empty") - (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf, + (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf, "--use-s3fs") self.assertCmdSuccess(result, out, err) @@ -103,14 +103,14 @@ class NtACLCmdGetSetTestCase(SambaToolCmdTest): tempf = os.path.join(path,"pytests"+str(int(100000*random.random()))) open(tempf, 'w').write("empty") - (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf, + (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf, "--use-ntvfs") self.assertCmdSuccess(result, out, err) self.assertEquals(out,"","Shouldn't be any output messages") self.assertIn("Please note that POSIX permissions have NOT been changed, only the stored NT ACL", err) # Now check they were set correctly - (result, out, err) = self.runsubcmd("ntacl", "get", tempf, + (result, out, err) = self.runsubcmd("ntacl", "get", tempf, "--use-ntvfs", "--as-sddl") self.assertCmdSuccess(result, out, err) self.assertEquals(err,"","Shouldn't be any error messages") @@ -121,14 +121,14 @@ class NtACLCmdGetSetTestCase(SambaToolCmdTest): tempf = os.path.join(path,"pytests"+str(int(100000*random.random()))) open(tempf, 'w').write("empty") - (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf, + (result, out, err) = self.runsubcmd("ntacl", "set", self.acl, tempf, "--use-s3fs") self.assertCmdSuccess(result, out, err) self.assertEquals(out,"","Shouldn't be any output messages") self.assertEquals(err,"","Shouldn't be any error messages") # Now check they were set correctly - (result, out, err) = self.runsubcmd("ntacl", "get", tempf, + (result, out, err) = self.runsubcmd("ntacl", "get", tempf, "--use-s3fs", "--as-sddl") self.assertCmdSuccess(result, out, err) self.assertEquals(err,"","Shouldn't be any error messages") diff --git a/python/samba/tests/samba_tool/user.py b/python/samba/tests/samba_tool/user.py index e219d68aaba..4d264b4027d 100644 --- a/python/samba/tests/samba_tool/user.py +++ b/python/samba/tests/samba_tool/user.py @@ -82,7 +82,7 @@ class UserCmdTestCase(SambaToolCmdTest): # test adding users with --use-username-as-cn for user in self.users: - (result, out, err) = self.runsubcmd("user", "create", user["name"], user["password"], + (result, out, err) = self.runsubcmd("user", "create", user["name"], user["password"], "--use-username-as-cn", "--surname=%s" % user["surname"], "--given-name=%s" % user["given-name"], @@ -389,7 +389,7 @@ sAMAccountName: %s def test_move(self): full_ou_dn = str(self.samdb.normalize_dn_in_domain("OU=movetest")) - (result, out, err) = self.runsubcmd("ou", "create", full_ou_dn) + (result, out, err) = self.runsubcmd("ou", "create", full_ou_dn) self.assertCmdSuccess(result, out, err) self.assertEquals(err, "", "There shouldn't be any error message") self.assertIn('Created ou "%s"' % full_ou_dn, out) @@ -402,7 +402,7 @@ sAMAccountName: %s (user["name"], full_ou_dn), out) # Should fail as users objects are in OU - (result, out, err) = self.runsubcmd("ou", "delete", full_ou_dn) + (result, out, err) = self.runsubcmd("ou", "delete", full_ou_dn) self.assertCmdFail(result) self.assertIn(("subtree_delete: Unable to delete a non-leaf node " "(it has %d children)!") % len(self.users), err) diff --git a/python/samba/upgrade.py b/python/samba/upgrade.py index f5fffbd404d..69b4e290b76 100644 --- a/python/samba/upgrade.py +++ b/python/samba/upgrade.py @@ -467,7 +467,7 @@ def upgrade_from_samba3(samba3, logger, targetdir, session_info=None, machinepass = None if samba3.lp.get("passdb backend").split(":")[0].strip() == "ldapsam": - base_dn = samba3.lp.get("ldap suffix") + base_dn = samba3.lp.get("ldap suffix") ldapuser = samba3.lp.get("ldap admin dn") ldappass = secrets_db.get_ldap_bind_pw(ldapuser) if ldappass is None: diff --git a/python/samba/upgradehelpers.py b/python/samba/upgradehelpers.py index e8f0dba8cdc..90c65377d40 100644 --- a/python/samba/upgradehelpers.py +++ b/python/samba/upgradehelpers.py @@ -49,13 +49,13 @@ import tempfile # And so opening them create a file in the current directory which is not what # we want # I still keep them commented because I plan soon to make more cleaner -ERROR = -1 -SIMPLE = 0x00 -CHANGE = 0x01 -CHANGESD = 0x02 -GUESS = 0x04 -PROVISION = 0x08 -CHANGEALL = 0xff +ERROR = -1 +SIMPLE = 0x00 +CHANGE = 0x01 +CHANGESD = 0x02 +GUESS = 0x04 +PROVISION = 0x08 +CHANGEALL = 0xff hashAttrNotCopied = set(["dn", "whenCreated", "whenChanged", "objectGUID", "uSNCreated", "replPropertyMetaData", "uSNChanged", "parentGUID", @@ -173,7 +173,7 @@ def usn_in_range(usn, range): cont = True ok = False while cont: - if idx == len(range): + if idx == len(range): cont = False continue if usn < int(range[idx]): diff --git a/script/autobuild.py b/script/autobuild.py index 4a27e1b5255..dc5af0f0dca 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -77,7 +77,7 @@ if os.environ.get("AUTOBUILD_SKIP_SAMBA_O3", "0") == "1": ctdb_configure_params = " --enable-developer --picky-developer ${PREFIX}" samba_configure_params = " --picky-developer ${PREFIX} ${EXTRA_PYTHON} --with-profiling-data" -samba_libs_envvars = "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH" +samba_libs_envvars = "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH" samba_libs_envvars += " PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig" samba_libs_envvars += " ADDITIONAL_CFLAGS='-Wmissing-prototypes'" samba_libs_configure_base = samba_libs_envvars + " ./configure --abi-check --enable-debug --picky-developer -C ${PREFIX}" diff --git a/source3/script/tests/test_wbinfo_sids2xids_int.py b/source3/script/tests/test_wbinfo_sids2xids_int.py index 7ffc8ece2f7..a460d8abce6 100755 --- a/source3/script/tests/test_wbinfo_sids2xids_int.py +++ b/source3/script/tests/test_wbinfo_sids2xids_int.py @@ -39,7 +39,7 @@ sids=[domsid + '-512', 'S-1-5-32-545', domsid + '-513', 'S-1-1-0', 'S-1-3-1', 'S flush_cache(sids=sids) -sids2xids = subprocess.Popen([wbinfo, '--sids-to-unix-ids=' + ','.join(sids)], +sids2xids = subprocess.Popen([wbinfo, '--sids-to-unix-ids=' + ','.join(sids)], stdout=subprocess.PIPE).communicate()[0].strip() gids=[] @@ -87,7 +87,7 @@ def check_singular(sids, ids, idtype='gid'): # Check the list produced by the sids-to-xids call with the # multiple variant (sid-to-xid) for each sid in turn. def check_multiple(sids, idtypes): - sids2xids = subprocess.Popen([wbinfo, '--sids-to-unix-ids=' + ','.join(sids)], + sids2xids = subprocess.Popen([wbinfo, '--sids-to-unix-ids=' + ','.join(sids)], stdout=subprocess.PIPE).communicate()[0].strip() # print sids2xids i = 0 diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index e5b3fd6f33b..393b0d9f60a 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -461,7 +461,7 @@ for t in tests: elif t == "raw.chkpath": plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD') plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD') - elif t == "raw.samba3hide" or t == "raw.samba3checkfsp" or t == "raw.samba3closeerr": + elif t == "raw.samba3hide" or t == "raw.samba3checkfsp" or t == "raw.samba3closeerr": plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD') plansmbtorture4testsuite(t, "simpleserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD') plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD') diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py index 6803483dc46..f2f87bc765e 100755 --- a/source4/dsdb/tests/python/acl.py +++ b/source4/dsdb/tests/python/acl.py @@ -544,7 +544,7 @@ adminDescription: blah blah blah""" dn: CN=test_modify_group2,CN=Users,""" + self.base_dn + """ changetype: modify add: Member -Member: """ + self.get_user_dn(self.user_with_sm) +Member: """ + self.get_user_dn(self.user_with_sm) #the user has no rights granted, this should fail try: self.ldb_user2.modify_ldif(ldif) @@ -583,7 +583,7 @@ Member: CN=test_modify_user2,CN=Users,""" + self.base_dn dn: CN=test_modify_group2,CN=Users,""" + self.base_dn + """ changetype: modify add: Member -Member: """ + self.get_user_dn(self.user_with_sm) + """ +Member: """ + self.get_user_dn(self.user_with_sm) + """ Member: CN=test_modify_user2,CN=Users,""" + self.base_dn #grant self-membership, should be able to add himself but not others at the same time @@ -608,7 +608,7 @@ Member: CN=test_modify_user2,CN=Users,""" + self.base_dn dn: CN=test_modify_group2,CN=Users,""" + self.base_dn + """ changetype: modify add: Member -Member: """ + self.get_user_dn(self.user_with_wp) +Member: """ + self.get_user_dn(self.user_with_wp) self.ldb_user.modify_ldif(ldif) res = self.ldb_admin.search(self.base_dn, expression="(distinguishedName=%s)" \ % ("CN=test_modify_group2,CN=Users," + self.base_dn), attrs=["Member"]) @@ -1981,11 +1981,11 @@ class AclSPNTests(AclTests): ctx.connection_dn = "CN=RODC Connection (FRS),%s" % ctx.ntds_dn ctx.secure_channel_type = misc.SEC_CHAN_RODC ctx.RODC = True - ctx.replica_flags = (drsuapi.DRSUAPI_DRS_INIT_SYNC | - drsuapi.DRSUAPI_DRS_PER_SYNC | - drsuapi.DRSUAPI_DRS_GET_ANC | - drsuapi.DRSUAPI_DRS_NEVER_SYNCED | - drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING) + ctx.replica_flags = (drsuapi.DRSUAPI_DRS_INIT_SYNC | + drsuapi.DRSUAPI_DRS_PER_SYNC | + drsuapi.DRSUAPI_DRS_GET_ANC | + drsuapi.DRSUAPI_DRS_NEVER_SYNCED | + drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING) ctx.join_add_objects() diff --git a/source4/dsdb/tests/python/ldap_schema.py b/source4/dsdb/tests/python/ldap_schema.py index d937475f8c9..f60f36d3e00 100755 --- a/source4/dsdb/tests/python/ldap_schema.py +++ b/source4/dsdb/tests/python/ldap_schema.py @@ -1625,7 +1625,7 @@ class SchemaTests_msDS_isRODC(samba.tests.TestCase): def setUp(self): super(SchemaTests_msDS_isRODC, self).setUp() - self.ldb = SamDB(host, credentials=creds, + self.ldb = SamDB(host, credentials=creds, session_info=system_session(lp), lp=lp, options=ldb_options) res = self.ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["defaultNamingContext"]) self.assertEquals(len(res), 1) diff --git a/source4/dsdb/tests/python/ndr_pack_performance.py b/source4/dsdb/tests/python/ndr_pack_performance.py index c5a42c60f61..27fd79a56fd 100644 --- a/source4/dsdb/tests/python/ndr_pack_performance.py +++ b/source4/dsdb/tests/python/ndr_pack_performance.py @@ -208,7 +208,7 @@ class UserTests(samba.tests.TestCase): def test_pack_repl_sample(self): blob = self.get_file_blob('testdata/replication-ndrpack-example.gz') - desc = ndr_unpack(drsuapi.DsGetNCChangesCtr6, blob) + desc = ndr_unpack(drsuapi.DsGetNCChangesCtr6, blob) self._test_pack(desc, cycles=20) if "://" not in host: diff --git a/source4/torture/drs/python/repl_rodc.py b/source4/torture/drs/python/repl_rodc.py index 893bfcc037c..abd070664f9 100644 --- a/source4/torture/drs/python/repl_rodc.py +++ b/source4/torture/drs/python/repl_rodc.py @@ -683,10 +683,10 @@ class DrsRodcTestCase(drs_base.DrsBaseTestCase): ctx.connection_dn = "CN=RODC Connection (FRS),%s" % ctx.ntds_dn ctx.secure_channel_type = misc.SEC_CHAN_RODC ctx.RODC = True - ctx.replica_flags = (drsuapi.DRSUAPI_DRS_INIT_SYNC | - drsuapi.DRSUAPI_DRS_PER_SYNC | - drsuapi.DRSUAPI_DRS_GET_ANC | - drsuapi.DRSUAPI_DRS_NEVER_SYNCED | - drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING) + ctx.replica_flags = (drsuapi.DRSUAPI_DRS_INIT_SYNC | + drsuapi.DRSUAPI_DRS_PER_SYNC | + drsuapi.DRSUAPI_DRS_GET_ANC | + drsuapi.DRSUAPI_DRS_NEVER_SYNCED | + drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING) ctx.join_add_objects() diff --git a/source4/torture/drs/python/ridalloc_exop.py b/source4/torture/drs/python/ridalloc_exop.py index 93101d70e10..0aa004459ac 100644 --- a/source4/torture/drs/python/ridalloc_exop.py +++ b/source4/torture/drs/python/ridalloc_exop.py @@ -219,7 +219,7 @@ class DrsReplicaSyncTestCase(drs_base.DrsBaseTestCase): ldb_dc1.modify(m) except ldb.LdbError as e1: (num, msg) = e1.args - self.fail("Failed to reassign RID Master " + msg) + self.fail("Failed to reassign RID Master " + msg) try: # 2. Perform a RID alloc @@ -260,7 +260,7 @@ class DrsReplicaSyncTestCase(drs_base.DrsBaseTestCase): ldb_dc2.modify(m) except ldb.LdbError as e: (num, msg) = e.args - self.fail("Failed to restore RID Master " + msg) + self.fail("Failed to restore RID Master " + msg) def test_offline_samba_tool_seized_ridalloc(self): """Perform a join against the non-RID manager and then seize the RID Manager role""" |