From b43408b383d06d7c0c87b8f6e9549544fc057bc2 Mon Sep 17 00:00:00 2001 From: Joe Guo Date: Mon, 30 Jul 2018 18:14:13 +1200 Subject: [PATCH] PEP8: fix E121: continuation line under-indented for hanging indent Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- python/samba/netcmd/domain.py | 20 +-- python/samba/netcmd/domain_backup.py | 4 +- python/samba/netcmd/drs.py | 2 +- python/samba/netcmd/user.py | 2 +- python/samba/provision/__init__.py | 4 +- python/samba/samdb.py | 2 +- python/samba/schema.py | 2 +- script/autobuild.py | 2 +- selftest/subunithelper.py | 2 +- source3/selftest/tests.py | 4 +- source4/dsdb/tests/python/ldap.py | 12 +- source4/dsdb/tests/python/password_lockout.py | 2 +- .../tests/python/password_lockout_base.py | 2 +- source4/dsdb/tests/python/sam.py | 128 +++++++++--------- 14 files changed, 94 insertions(+), 94 deletions(-) diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py index 6f2e04b8ad7..25d1d4a67b0 100644 --- a/python/samba/netcmd/domain.py +++ b/python/samba/netcmd/domain.py @@ -659,7 +659,7 @@ class cmd_domain_join(Command): Option("--parent-domain", help="parent domain to create subdomain under", type=str), Option("--adminpass", type="string", metavar="PASSWORD", help="choose adminstrator password when joining as a subdomain (otherwise random)"), - ] + ] ntvfs_options = [ Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)", @@ -1227,7 +1227,7 @@ class cmd_domain_level(Command): m = ldb.Message() m.dn = ldb.Dn(samdb, domain_dn) m["msDS-Behavior-Version"]= ldb.MessageElement( - str(new_level_domain), ldb.FLAG_MOD_REPLACE, + str(new_level_domain), ldb.FLAG_MOD_REPLACE, "msDS-Behavior-Version") samdb.modify(m) # Under partitions @@ -1235,7 +1235,7 @@ class cmd_domain_level(Command): m.dn = ldb.Dn(samdb, "CN=" + lp.get("workgroup") + ",CN=Partitions,%s" % samdb.get_config_basedn()) m["msDS-Behavior-Version"]= ldb.MessageElement( - str(new_level_domain), ldb.FLAG_MOD_REPLACE, + str(new_level_domain), ldb.FLAG_MOD_REPLACE, "msDS-Behavior-Version") try: samdb.modify(m) @@ -1267,7 +1267,7 @@ class cmd_domain_level(Command): m = ldb.Message() m.dn = ldb.Dn(samdb, "CN=Partitions,%s" % samdb.get_config_basedn()) m["msDS-Behavior-Version"]= ldb.MessageElement( - str(new_level_forest), ldb.FLAG_MOD_REPLACE, + str(new_level_forest), ldb.FLAG_MOD_REPLACE, "msDS-Behavior-Version") samdb.modify(m) msgs.append("Forest function level changed!") @@ -2098,7 +2098,7 @@ class cmd_domain_trust_list(DomainTrustCommand): } takes_options = [ - ] + ] def run(self, sambaopts=None, versionopts=None, localdcopts=None): @@ -2143,7 +2143,7 @@ class cmd_domain_trust_show(DomainTrustCommand): } takes_options = [ - ] + ] takes_args = ["domain"] @@ -2286,7 +2286,7 @@ class cmd_domain_trust_create(DomainTrustCommand): help="Skip validation of the trust.", dest='validate', default=True), - ] + ] takes_args = ["domain"] @@ -2782,7 +2782,7 @@ class cmd_domain_trust_delete(DomainTrustCommand): help="Where to delete the trusted domain object: 'local' or 'both'.", dest='delete_location', default="both"), - ] + ] takes_args = ["domain"] @@ -2939,7 +2939,7 @@ class cmd_domain_trust_validate(DomainTrustCommand): help="Where to validate the trusted domain object: 'local' or 'both'.", dest='validate_location', default="both"), - ] + ] takes_args = ["domain"] @@ -3162,7 +3162,7 @@ class cmd_domain_trust_namespaces(DomainTrustCommand): help="Delete an existing msDS-SPNSuffixes attribute of the local forest. Can be specified multiple times.", dest='delete_spn', default=[]), - ] + ] takes_args = ["domain?"] diff --git a/python/samba/netcmd/domain_backup.py b/python/samba/netcmd/domain_backup.py index ae04ec1d2c4..c2571e9cd75 100644 --- a/python/samba/netcmd/domain_backup.py +++ b/python/samba/netcmd/domain_backup.py @@ -208,7 +208,7 @@ class cmd_domain_backup_online(samba.netcmd.Command): help="Directory to write the backup file to"), Option("--no-secrets", action="store_true", default=False, help="Exclude secret values from the backup created") - ] + ] def run(self, sambaopts=None, credopts=None, server=None, targetdir=None, no_secrets=False): @@ -585,7 +585,7 @@ class cmd_domain_backup_rename(samba.netcmd.Command): help="Retain the DNS entries for the old realm in the backup"), Option("--no-secrets", action="store_true", default=False, help="Exclude secret values from the backup created") - ] + ] takes_args = ["new_domain_name", "new_dns_realm"] diff --git a/python/samba/netcmd/drs.py b/python/samba/netcmd/drs.py index 8259af60069..7ed0486c73a 100644 --- a/python/samba/netcmd/drs.py +++ b/python/samba/netcmd/drs.py @@ -753,7 +753,7 @@ class cmd_drs_clone_dc_database(Command): Option("-q", "--quiet", help="Be quiet", action="store_true"), Option("--include-secrets", help="Also replicate secret values", action="store_true"), Option("-v", "--verbose", help="Be verbose", action="store_true") - ] + ] takes_args = ["domain"] diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py index 2131c68a0c7..9780f094931 100644 --- a/python/samba/netcmd/user.py +++ b/python/samba/netcmd/user.py @@ -1751,7 +1751,7 @@ samba-tool user syncpasswords --terminate \\ dirsync_filter = "(&" + \ "(objectClass=user)" + \ "(userAccountControl:%s:=%u)" % ( - ldb.OID_COMPARATOR_AND, dsdb.UF_NORMAL_ACCOUNT) + \ + ldb.OID_COMPARATOR_AND, dsdb.UF_NORMAL_ACCOUNT) + \ "(!(sAMAccountName=krbtgt*))" + \ ")" diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py index dd875f8065a..9daa6514266 100644 --- a/python/samba/provision/__init__.py +++ b/python/samba/provision/__init__.py @@ -225,7 +225,7 @@ def find_provision_key_parameters(samdb, secretsdb, idmapdb, paths, smbconf, raise ProvisioningError(("basedn in %s (%s) and from %s (%s)" "is not the same ..." % (paths.samdb, str(current[0]["defaultNamingContext"][0].decode('utf8')), - paths.smbconf, basedn))) + paths.smbconf, basedn))) names.domaindn=current[0]["defaultNamingContext"][0] names.rootdn=current[0]["rootDomainNamingContext"][0] @@ -2042,7 +2042,7 @@ def provision_fake_ypserver(logger, samdb, domaindn, netbiosname, nisdomain, "DOMAINDN": domaindn, "NETBIOSNAME": netbiosname, "NISDOMAIN": nisdomain, - }) + }) except: samdb.transaction_cancel() raise diff --git a/python/samba/samdb.py b/python/samba/samdb.py index e0c29d8217d..0ed26aa0421 100644 --- a/python/samba/samdb.py +++ b/python/samba/samdb.py @@ -609,7 +609,7 @@ unicodePwd:: %s if force_change_at_next_login: self.force_password_change_at_next_login( - "(distinguishedName=" + str(user_dn) + ")") + "(distinguishedName=" + str(user_dn) + ")") # modify the userAccountControl to remove the disabled bit self.enable_account(search_filter) diff --git a/python/samba/schema.py b/python/samba/schema.py index c5537080296..cf3243a89f9 100644 --- a/python/samba/schema.py +++ b/python/samba/schema.py @@ -64,7 +64,7 @@ class Schema(object): # the schema files (and corresponding object version) that we know about base_schemas = { - "2008_R2_old" : ("MS-AD_Schema_2K8_R2_Attributes.txt", + "2008_R2_old" : ("MS-AD_Schema_2K8_R2_Attributes.txt", "MS-AD_Schema_2K8_R2_Classes.txt", 47), "2008_R2" : ("Attributes_for_AD_DS__Windows_Server_2008_R2.ldf", diff --git a/script/autobuild.py b/script/autobuild.py index 19a511398b2..5e78aa15434 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -485,7 +485,7 @@ class buildlist(object): diff old_remote_branch.desc remote_branch.desc done ''' % ( - rebase_branch, rebase_remote, rebase_url, + rebase_branch, rebase_remote, rebase_url, rebase_remote, rebase_remote, rebase_branch, rebase_remote, diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py index db9b3e77525..48b6685256e 100644 --- a/selftest/subunithelper.py +++ b/selftest/subunithelper.py @@ -667,7 +667,7 @@ class PlainFormatter(TestsuiteEnabledTestResult): if not self.immediate: sys.stdout.write({ - 'error': 'E', + 'error': 'E', 'failure': 'F', 'uxsuccess': 'U', 'success': 'S'}.get(result, "?")) diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index b6b300545dc..843dbec7392 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -23,9 +23,9 @@ sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "../ import selftesthelpers from selftesthelpers import * smbtorture4_options.extend([ - '--option=torture:sharedelay=100000', + '--option=torture:sharedelay=100000', '--option=torture:writetimeupdatedelay=500000', - ]) + ]) def plansmbtorture4testsuite(name, env, options, description=''): if description == '': diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py index eb8d7e99dd8..f3b64d66f2c 100755 --- a/source4/dsdb/tests/python/ldap.py +++ b/source4/dsdb/tests/python/ldap.py @@ -903,7 +903,7 @@ class BasicTests(samba.tests.TestCase): # Too short (min. 1) try: ldb.add({ - "dn": "cn=ldaptestuser,cn=users," + self.base_dn, + "dn": "cn=ldaptestuser,cn=users," + self.base_dn, "objectClass": "person", "sn": "" }) self.fail() @@ -922,7 +922,7 @@ class BasicTests(samba.tests.TestCase): # self.assertEquals(num, ERR_CONSTRAINT_VIOLATION) ldb.add({ - "dn": "cn=ldaptestuser,cn=users," + self.base_dn, + "dn": "cn=ldaptestuser,cn=users," + self.base_dn, "objectClass": "person" }) # Too short (min. 1) @@ -1138,7 +1138,7 @@ class BasicTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["dn"] = MessageElement( - "cn=ldaptestgroup,cn=users," + self.base_dn, FLAG_MOD_REPLACE, + "cn=ldaptestgroup,cn=users," + self.base_dn, FLAG_MOD_REPLACE, "dn") try: ldb.modify(m) @@ -1150,7 +1150,7 @@ class BasicTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["distinguishedName"] = MessageElement( - "cn=ldaptestuser,cn=users," + self.base_dn, FLAG_MOD_ADD, + "cn=ldaptestuser,cn=users," + self.base_dn, FLAG_MOD_ADD, "distinguishedName") try: @@ -1163,7 +1163,7 @@ class BasicTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["distinguishedName"] = MessageElement( - "cn=ldaptestuser,cn=users," + self.base_dn, FLAG_MOD_REPLACE, + "cn=ldaptestuser,cn=users," + self.base_dn, FLAG_MOD_REPLACE, "distinguishedName") try: @@ -1176,7 +1176,7 @@ class BasicTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["distinguishedName"] = MessageElement( - "cn=ldaptestuser,cn=users," + self.base_dn, FLAG_MOD_DELETE, + "cn=ldaptestuser,cn=users," + self.base_dn, FLAG_MOD_DELETE, "distinguishedName") try: diff --git a/source4/dsdb/tests/python/password_lockout.py b/source4/dsdb/tests/python/password_lockout.py index ec6cf13fe66..aac59ca9f50 100755 --- a/source4/dsdb/tests/python/password_lockout.py +++ b/source4/dsdb/tests/python/password_lockout.py @@ -403,7 +403,7 @@ userPassword: thatsAcomplPASS2x m = Message() m.dn = Dn(self.ldb, userdn) m["userAccountControl"] = MessageElement( - str(dsdb.UF_LOCKOUT), + str(dsdb.UF_LOCKOUT), FLAG_MOD_REPLACE, "userAccountControl") self.ldb.modify(m) diff --git a/source4/dsdb/tests/python/password_lockout_base.py b/source4/dsdb/tests/python/password_lockout_base.py index 4a320684702..e3efad7c385 100644 --- a/source4/dsdb/tests/python/password_lockout_base.py +++ b/source4/dsdb/tests/python/password_lockout_base.py @@ -113,7 +113,7 @@ class BasePasswordTestCase(PasswordTestCase): if msg is not None: print("\033[01;32m %s \033[00m\n" % msg) attrs = [ - "objectSid", + "objectSid", "badPwdCount", "badPasswordTime", "lastLogon", diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py index ec9bc90304b..91a79483367 100755 --- a/source4/dsdb/tests/python/sam.py +++ b/source4/dsdb/tests/python/sam.py @@ -430,7 +430,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["member"] = MessageElement( - "cn=ldaptestuser3,cn=users," + self.base_dn, + "cn=ldaptestuser3,cn=users," + self.base_dn, FLAG_MOD_ADD, "member") try: ldb.modify(m) @@ -503,7 +503,7 @@ class SamTests(samba.tests.TestCase): # Also this should be denied try: ldb.add({ - "dn": "cn=ldaptestuser2,cn=users," + self.base_dn, + "dn": "cn=ldaptestuser2,cn=users," + self.base_dn, "objectclass": "user", "primaryGroupID": "0"}) self.fail() @@ -1008,7 +1008,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_GLOBAL_GROUP), + str(GTYPE_SECURITY_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1024,7 +1024,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_DOMAIN_LOCAL_GROUP), + str(GTYPE_SECURITY_DOMAIN_LOCAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) self.fail() @@ -1037,7 +1037,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_UNIVERSAL_GROUP), + str(GTYPE_SECURITY_UNIVERSAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1052,7 +1052,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_GLOBAL_GROUP), + str(GTYPE_SECURITY_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1067,7 +1067,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_UNIVERSAL_GROUP), + str(GTYPE_SECURITY_UNIVERSAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1082,7 +1082,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_DOMAIN_LOCAL_GROUP), + str(GTYPE_SECURITY_DOMAIN_LOCAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1098,7 +1098,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_GLOBAL_GROUP), + str(GTYPE_SECURITY_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) self.fail() @@ -1112,7 +1112,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_BUILTIN_LOCAL_GROUP), + str(GTYPE_SECURITY_BUILTIN_LOCAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) self.fail() @@ -1128,7 +1128,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_UNIVERSAL_GROUP), + str(GTYPE_SECURITY_UNIVERSAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1144,7 +1144,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_BUILTIN_LOCAL_GROUP), + str(GTYPE_SECURITY_BUILTIN_LOCAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) self.fail() @@ -1157,7 +1157,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_GLOBAL_GROUP), + str(GTYPE_SECURITY_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1173,7 +1173,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_BUILTIN_LOCAL_GROUP), + str(GTYPE_SECURITY_BUILTIN_LOCAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) self.fail() @@ -1188,7 +1188,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_GLOBAL_GROUP), + str(GTYPE_DISTRIBUTION_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1204,7 +1204,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP), + str(GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) self.fail() @@ -1217,7 +1217,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_UNIVERSAL_GROUP), + str(GTYPE_DISTRIBUTION_UNIVERSAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1232,7 +1232,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_GLOBAL_GROUP), + str(GTYPE_DISTRIBUTION_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1247,7 +1247,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_UNIVERSAL_GROUP), + str(GTYPE_DISTRIBUTION_UNIVERSAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1262,7 +1262,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP), + str(GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1278,7 +1278,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_GLOBAL_GROUP), + str(GTYPE_DISTRIBUTION_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) self.fail() @@ -1292,7 +1292,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["member"] = MessageElement( - "cn=ldaptestuser3,cn=users," + self.base_dn, + "cn=ldaptestuser3,cn=users," + self.base_dn, FLAG_MOD_ADD, "member") try: ldb.modify(m) @@ -1305,7 +1305,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_UNIVERSAL_GROUP), + str(GTYPE_DISTRIBUTION_UNIVERSAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1320,7 +1320,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_GLOBAL_GROUP), + str(GTYPE_DISTRIBUTION_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1338,7 +1338,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_GLOBAL_GROUP), + str(GTYPE_SECURITY_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1354,7 +1354,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP), + str(GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) self.fail() @@ -1367,7 +1367,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_UNIVERSAL_GROUP), + str(GTYPE_DISTRIBUTION_UNIVERSAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1382,7 +1382,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_GLOBAL_GROUP), + str(GTYPE_SECURITY_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1397,7 +1397,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_UNIVERSAL_GROUP), + str(GTYPE_SECURITY_UNIVERSAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1412,7 +1412,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP), + str(GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1428,7 +1428,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_DISTRIBUTION_GLOBAL_GROUP), + str(GTYPE_DISTRIBUTION_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) self.fail() @@ -1441,7 +1441,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_UNIVERSAL_GROUP), + str(GTYPE_SECURITY_UNIVERSAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -1456,7 +1456,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn) m["groupType"] = MessageElement( - str(GTYPE_SECURITY_GLOBAL_GROUP), + str(GTYPE_SECURITY_GLOBAL_GROUP), FLAG_MOD_REPLACE, "groupType") ldb.modify(m) @@ -2015,7 +2015,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT), + str(UF_NORMAL_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) except LdbError as e65: @@ -2025,7 +2025,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), + str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2040,7 +2040,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_ACCOUNTDISABLE), + str(UF_ACCOUNTDISABLE), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2062,7 +2062,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_LOCKOUT | UF_PASSWORD_EXPIRED), + str(UF_LOCKOUT | UF_PASSWORD_EXPIRED), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2081,7 +2081,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_TEMP_DUPLICATE_ACCOUNT), + str(UF_TEMP_DUPLICATE_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) self.fail() @@ -2093,7 +2093,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_SERVER_TRUST_ACCOUNT), + str(UF_SERVER_TRUST_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) self.fail() @@ -2104,7 +2104,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_WORKSTATION_TRUST_ACCOUNT), + str(UF_WORKSTATION_TRUST_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2112,7 +2112,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_WORKSTATION_TRUST_ACCOUNT | UF_PARTIAL_SECRETS_ACCOUNT), + str(UF_WORKSTATION_TRUST_ACCOUNT | UF_PARTIAL_SECRETS_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) self.fail() @@ -2129,7 +2129,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), + str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2143,7 +2143,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_INTERDOMAIN_TRUST_ACCOUNT), + str(UF_INTERDOMAIN_TRUST_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) self.fail() @@ -2292,7 +2292,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT), + str(UF_NORMAL_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) except LdbError as e74: @@ -2302,7 +2302,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), + str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2317,7 +2317,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_ACCOUNTDISABLE), + str(UF_ACCOUNTDISABLE), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2339,7 +2339,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_LOCKOUT | UF_PASSWORD_EXPIRED), + str(UF_LOCKOUT | UF_PASSWORD_EXPIRED), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2358,7 +2358,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_TEMP_DUPLICATE_ACCOUNT), + str(UF_TEMP_DUPLICATE_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) self.fail() @@ -2369,7 +2369,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_SERVER_TRUST_ACCOUNT), + str(UF_SERVER_TRUST_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2382,7 +2382,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), + str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2395,7 +2395,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_WORKSTATION_TRUST_ACCOUNT), + str(UF_WORKSTATION_TRUST_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2408,7 +2408,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), + str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2421,7 +2421,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_SERVER_TRUST_ACCOUNT), + str(UF_SERVER_TRUST_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2434,7 +2434,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_WORKSTATION_TRUST_ACCOUNT), + str(UF_WORKSTATION_TRUST_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2448,7 +2448,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_INTERDOMAIN_TRUST_ACCOUNT), + str(UF_INTERDOMAIN_TRUST_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) self.fail() @@ -2475,7 +2475,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "") m["member"] = MessageElement( - "cn=ldaptestuser2,cn=users," + self.base_dn, FLAG_MOD_ADD, "member") + "cn=ldaptestuser2,cn=users," + self.base_dn, FLAG_MOD_ADD, "member") ldb.modify(m) m = Message() @@ -2487,7 +2487,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser2,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), + str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2509,7 +2509,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "") m["member"] = MessageElement( - "cn=ldaptestcomputer,cn=computers," + self.base_dn, FLAG_MOD_ADD, "member") + "cn=ldaptestcomputer,cn=computers," + self.base_dn, FLAG_MOD_ADD, "member") ldb.modify(m) m = Message() @@ -2521,7 +2521,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_WORKSTATION_TRUST_ACCOUNT), + str(UF_WORKSTATION_TRUST_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2599,7 +2599,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT|UF_SMARTCARD_REQUIRED), + str(UF_NORMAL_ACCOUNT|UF_SMARTCARD_REQUIRED), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2701,7 +2701,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT|UF_ACCOUNTDISABLE|UF_SMARTCARD_REQUIRED), + str(UF_NORMAL_ACCOUNT|UF_ACCOUNTDISABLE|UF_SMARTCARD_REQUIRED), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2748,7 +2748,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT|UF_SMARTCARD_REQUIRED), + str(UF_NORMAL_ACCOUNT|UF_SMARTCARD_REQUIRED), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2849,7 +2849,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_NORMAL_ACCOUNT|UF_SMARTCARD_REQUIRED), + str(UF_NORMAL_ACCOUNT|UF_SMARTCARD_REQUIRED), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) @@ -2979,7 +2979,7 @@ class SamTests(samba.tests.TestCase): m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["userAccountControl"] = MessageElement( - str(UF_WORKSTATION_TRUST_ACCOUNT | UF_PARTIAL_SECRETS_ACCOUNT), + str(UF_WORKSTATION_TRUST_ACCOUNT | UF_PARTIAL_SECRETS_ACCOUNT), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) -- 2.34.1