mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
PEP8: fix E122: continuation line missing indentation or outdented
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
@ -1045,7 +1045,7 @@ class DCJoinContext(object):
|
|||||||
client_version = dnsserver.DNS_CLIENT_VERSION_LONGHORN
|
client_version = dnsserver.DNS_CLIENT_VERSION_LONGHORN
|
||||||
record_type = dnsp.DNS_TYPE_A
|
record_type = dnsp.DNS_TYPE_A
|
||||||
select_flags = dnsserver.DNS_RPC_VIEW_AUTHORITY_DATA |\
|
select_flags = dnsserver.DNS_RPC_VIEW_AUTHORITY_DATA |\
|
||||||
dnsserver.DNS_RPC_VIEW_NO_CHILDREN
|
dnsserver.DNS_RPC_VIEW_NO_CHILDREN
|
||||||
|
|
||||||
zone = ctx.dnsdomain
|
zone = ctx.dnsdomain
|
||||||
msdcs_zone = "_msdcs.%s" % ctx.dnsforest
|
msdcs_zone = "_msdcs.%s" % ctx.dnsforest
|
||||||
|
@ -2487,7 +2487,7 @@ class cmd_domain_trust_create(DomainTrustCommand):
|
|||||||
if not self.check_runtime_error(error, ntstatus.NT_STATUS_OBJECT_NAME_NOT_FOUND):
|
if not self.check_runtime_error(error, ntstatus.NT_STATUS_OBJECT_NAME_NOT_FOUND):
|
||||||
raise self.LocalRuntimeError(self, error,
|
raise self.LocalRuntimeError(self, error,
|
||||||
"QueryTrustedDomainInfoByName(%s, FULL_INFO) failed" % (
|
"QueryTrustedDomainInfoByName(%s, FULL_INFO) failed" % (
|
||||||
lsaString.string))
|
lsaString.string))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
lsaString.string = local_trust_info.netbios_name.string
|
lsaString.string = local_trust_info.netbios_name.string
|
||||||
@ -2500,7 +2500,7 @@ class cmd_domain_trust_create(DomainTrustCommand):
|
|||||||
if not self.check_runtime_error(error, ntstatus.NT_STATUS_OBJECT_NAME_NOT_FOUND):
|
if not self.check_runtime_error(error, ntstatus.NT_STATUS_OBJECT_NAME_NOT_FOUND):
|
||||||
raise self.LocalRuntimeError(self, error,
|
raise self.LocalRuntimeError(self, error,
|
||||||
"QueryTrustedDomainInfoByName(%s, FULL_INFO) failed" % (
|
"QueryTrustedDomainInfoByName(%s, FULL_INFO) failed" % (
|
||||||
lsaString.string))
|
lsaString.string))
|
||||||
|
|
||||||
if remote_trust_info:
|
if remote_trust_info:
|
||||||
try:
|
try:
|
||||||
@ -2514,7 +2514,7 @@ class cmd_domain_trust_create(DomainTrustCommand):
|
|||||||
if not self.check_runtime_error(error, ntstatus.NT_STATUS_OBJECT_NAME_NOT_FOUND):
|
if not self.check_runtime_error(error, ntstatus.NT_STATUS_OBJECT_NAME_NOT_FOUND):
|
||||||
raise self.RemoteRuntimeError(self, error,
|
raise self.RemoteRuntimeError(self, error,
|
||||||
"QueryTrustedDomainInfoByName(%s, FULL_INFO) failed" % (
|
"QueryTrustedDomainInfoByName(%s, FULL_INFO) failed" % (
|
||||||
lsaString.string))
|
lsaString.string))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
lsaString.string = remote_trust_info.netbios_name.string
|
lsaString.string = remote_trust_info.netbios_name.string
|
||||||
@ -2527,7 +2527,7 @@ class cmd_domain_trust_create(DomainTrustCommand):
|
|||||||
if not self.check_runtime_error(error, ntstatus.NT_STATUS_OBJECT_NAME_NOT_FOUND):
|
if not self.check_runtime_error(error, ntstatus.NT_STATUS_OBJECT_NAME_NOT_FOUND):
|
||||||
raise self.RemoteRuntimeError(self, error,
|
raise self.RemoteRuntimeError(self, error,
|
||||||
"QueryTrustedDomainInfoByName(%s, FULL_INFO) failed" % (
|
"QueryTrustedDomainInfoByName(%s, FULL_INFO) failed" % (
|
||||||
lsaString.string))
|
lsaString.string))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
local_netlogon = self.new_local_netlogon_connection()
|
local_netlogon = self.new_local_netlogon_connection()
|
||||||
|
@ -237,9 +237,9 @@ class cmd_schema_attribute_show_oc(Command):
|
|||||||
schema_dn = samdb.schema_dn()
|
schema_dn = samdb.schema_dn()
|
||||||
|
|
||||||
may_filt = '(&(objectClass=classSchema)' \
|
may_filt = '(&(objectClass=classSchema)' \
|
||||||
'(|(mayContain={0})(systemMayContain={0})))'.format(attribute)
|
'(|(mayContain={0})(systemMayContain={0})))'.format(attribute)
|
||||||
must_filt = '(&(objectClass=classSchema)' \
|
must_filt = '(&(objectClass=classSchema)' \
|
||||||
'(|(mustContain={0})(systemMustContain={0})))'.format(attribute)
|
'(|(mustContain={0})(systemMustContain={0})))'.format(attribute)
|
||||||
|
|
||||||
may_res = samdb.search(base=schema_dn, scope=ldb.SCOPE_SUBTREE,
|
may_res = samdb.search(base=schema_dn, scope=ldb.SCOPE_SUBTREE,
|
||||||
expression=may_filt, attrs=['cn'])
|
expression=may_filt, attrs=['cn'])
|
||||||
|
@ -66,7 +66,7 @@ try:
|
|||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
gpgme_support = False
|
gpgme_support = False
|
||||||
decrypt_samba_gpg_help = "Decrypt the SambaGPG password not supported, " + \
|
decrypt_samba_gpg_help = "Decrypt the SambaGPG password not supported, " + \
|
||||||
"python-gpgme required"
|
"python-gpgme required"
|
||||||
|
|
||||||
disabled_virtual_attributes = {
|
disabled_virtual_attributes = {
|
||||||
}
|
}
|
||||||
|
@ -1032,16 +1032,16 @@ def setup_secretsdb(paths, session_info, backend_credentials, lp):
|
|||||||
if backend_credentials.get_bind_dn() is not None:
|
if backend_credentials.get_bind_dn() is not None:
|
||||||
setup_add_ldif(secrets_ldb,
|
setup_add_ldif(secrets_ldb,
|
||||||
setup_path("secrets_simple_ldap.ldif"), {
|
setup_path("secrets_simple_ldap.ldif"), {
|
||||||
"LDAPMANAGERDN": backend_credentials.get_bind_dn(),
|
"LDAPMANAGERDN": backend_credentials.get_bind_dn(),
|
||||||
"LDAPMANAGERPASS_B64": b64encode(backend_credentials.get_password()).decode('utf8')
|
"LDAPMANAGERPASS_B64": b64encode(backend_credentials.get_password()).decode('utf8')
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
setup_add_ldif(secrets_ldb,
|
setup_add_ldif(secrets_ldb,
|
||||||
setup_path("secrets_sasl_ldap.ldif"), {
|
setup_path("secrets_sasl_ldap.ldif"), {
|
||||||
"LDAPADMINUSER": backend_credentials.get_username(),
|
"LDAPADMINUSER": backend_credentials.get_username(),
|
||||||
"LDAPADMINREALM": backend_credentials.get_realm(),
|
"LDAPADMINREALM": backend_credentials.get_realm(),
|
||||||
"LDAPADMINPASS_B64": b64encode(backend_credentials.get_password()).decode('utf8')
|
"LDAPADMINPASS_B64": b64encode(backend_credentials.get_password()).decode('utf8')
|
||||||
})
|
})
|
||||||
except:
|
except:
|
||||||
secrets_ldb.transaction_cancel()
|
secrets_ldb.transaction_cancel()
|
||||||
raise
|
raise
|
||||||
@ -1196,12 +1196,12 @@ def setup_self_join(samdb, admin_session_info, names, fill, machinepass,
|
|||||||
# Setup fSMORoleOwner entries to point at the newly created DC entry
|
# Setup fSMORoleOwner entries to point at the newly created DC entry
|
||||||
setup_modify_ldif(samdb,
|
setup_modify_ldif(samdb,
|
||||||
setup_path("provision_self_join_modify_config.ldif"), {
|
setup_path("provision_self_join_modify_config.ldif"), {
|
||||||
"CONFIGDN": names.configdn,
|
"CONFIGDN": names.configdn,
|
||||||
"SCHEMADN": names.schemadn,
|
"SCHEMADN": names.schemadn,
|
||||||
"DEFAULTSITE": names.sitename,
|
"DEFAULTSITE": names.sitename,
|
||||||
"NETBIOSNAME": names.netbiosname,
|
"NETBIOSNAME": names.netbiosname,
|
||||||
"SERVERDN": names.serverdn,
|
"SERVERDN": names.serverdn,
|
||||||
})
|
})
|
||||||
|
|
||||||
system_session_info = system_session()
|
system_session_info = system_session()
|
||||||
samdb.set_session_info(system_session_info)
|
samdb.set_session_info(system_session_info)
|
||||||
@ -1484,9 +1484,9 @@ def fill_samdb(samdb, lp, names, logger, policyguid,
|
|||||||
logger.info("Modifying display specifiers and extended rights")
|
logger.info("Modifying display specifiers and extended rights")
|
||||||
setup_modify_ldif(samdb,
|
setup_modify_ldif(samdb,
|
||||||
setup_path("provision_configuration_modify.ldif"), {
|
setup_path("provision_configuration_modify.ldif"), {
|
||||||
"CONFIGDN": names.configdn,
|
"CONFIGDN": names.configdn,
|
||||||
"DISPLAYSPECIFIERS_DESCRIPTOR": protected2_descr
|
"DISPLAYSPECIFIERS_DESCRIPTOR": protected2_descr
|
||||||
})
|
})
|
||||||
|
|
||||||
logger.info("Adding users container")
|
logger.info("Adding users container")
|
||||||
users_desc = b64encode(get_domain_users_descriptor(names.domainsid)).decode('utf8')
|
users_desc = b64encode(get_domain_users_descriptor(names.domainsid)).decode('utf8')
|
||||||
@ -1506,7 +1506,7 @@ def fill_samdb(samdb, lp, names, logger, policyguid,
|
|||||||
logger.info("Modifying computers container")
|
logger.info("Modifying computers container")
|
||||||
setup_modify_ldif(samdb,
|
setup_modify_ldif(samdb,
|
||||||
setup_path("provision_computers_modify.ldif"), {
|
setup_path("provision_computers_modify.ldif"), {
|
||||||
"DOMAINDN": names.domaindn})
|
"DOMAINDN": names.domaindn})
|
||||||
logger.info("Setting up sam.ldb data")
|
logger.info("Setting up sam.ldb data")
|
||||||
infrastructure_desc = b64encode(get_domain_infrastructure_descriptor(names.domainsid)).decode('utf8')
|
infrastructure_desc = b64encode(get_domain_infrastructure_descriptor(names.domainsid)).decode('utf8')
|
||||||
lostandfound_desc = b64encode(get_domain_delete_protected2_descriptor(names.domainsid)).decode('utf8')
|
lostandfound_desc = b64encode(get_domain_delete_protected2_descriptor(names.domainsid)).decode('utf8')
|
||||||
|
@ -172,7 +172,7 @@ dn: @INDEXLIST
|
|||||||
""")
|
""")
|
||||||
|
|
||||||
schema_dn_add = self.schema_dn_add \
|
schema_dn_add = self.schema_dn_add \
|
||||||
+ "objectGUID: 24e2ca70-b093-4ae8-84c0-2d7ac652a1b8\n"
|
+ "objectGUID: 24e2ca70-b093-4ae8-84c0-2d7ac652a1b8\n"
|
||||||
|
|
||||||
# These bits of LDIF are supplied when the Schema object is created
|
# These bits of LDIF are supplied when the Schema object is created
|
||||||
self.ldb.add_ldif(schema_dn_add)
|
self.ldb.add_ldif(schema_dn_add)
|
||||||
|
@ -56,5 +56,5 @@ class DCKeytabTests(tests.TestCase):
|
|||||||
result += c
|
result += c
|
||||||
principal_parts = self.principal.split('@')
|
principal_parts = self.principal.split('@')
|
||||||
assert principal_parts[0] in result and \
|
assert principal_parts[0] in result and \
|
||||||
principal_parts[1] in result, \
|
principal_parts[1] in result, \
|
||||||
'Principal not found in generated keytab'
|
'Principal not found in generated keytab'
|
||||||
|
@ -169,7 +169,7 @@ class AclAddTests(AclTests):
|
|||||||
def assert_top_ou_deleted(self):
|
def assert_top_ou_deleted(self):
|
||||||
res = self.ldb_admin.search(self.base_dn,
|
res = self.ldb_admin.search(self.base_dn,
|
||||||
expression="(distinguishedName=%s,%s)" % (
|
expression="(distinguishedName=%s,%s)" % (
|
||||||
"OU=test_add_ou1", self.base_dn))
|
"OU=test_add_ou1", self.base_dn))
|
||||||
self.assertEqual(len(res), 0)
|
self.assertEqual(len(res), 0)
|
||||||
|
|
||||||
def test_add_u1(self):
|
def test_add_u1(self):
|
||||||
|
@ -137,7 +137,7 @@ if __name__ == "__main__":
|
|||||||
store_dn_len, store_dn_ofs,
|
store_dn_len, store_dn_ofs,
|
||||||
store_hwm_len, store_hwm_ofs,
|
store_hwm_len, store_hwm_ofs,
|
||||||
store_utdv_len, store_utdv_ofs) = \
|
store_utdv_len, store_utdv_ofs) = \
|
||||||
struct.unpack("<LLLLLLL", store_hdr)
|
struct.unpack("<LLLLLLL", store_hdr)
|
||||||
|
|
||||||
store_dn = store_blob[store_dn_ofs:store_dn_ofs + store_dn_len]
|
store_dn = store_blob[store_dn_ofs:store_dn_ofs + store_dn_len]
|
||||||
store_hwm_blob = store_blob[store_hwm_ofs:store_hwm_ofs + store_hwm_len]
|
store_hwm_blob = store_blob[store_hwm_ofs:store_hwm_ofs + store_hwm_len]
|
||||||
@ -399,7 +399,7 @@ if __name__ == "__main__":
|
|||||||
len(dn), dn_ofs,
|
len(dn), dn_ofs,
|
||||||
len(store_hwm_blob), hwm_ofs,
|
len(store_hwm_blob), hwm_ofs,
|
||||||
len(store_utdv_blob), utdv_ofs) + \
|
len(store_utdv_blob), utdv_ofs) + \
|
||||||
dn + store_hwm_blob + store_utdv_blob
|
dn + store_hwm_blob + store_utdv_blob
|
||||||
|
|
||||||
tmp_file = "%s.tmp" % cookie_file
|
tmp_file = "%s.tmp" % cookie_file
|
||||||
f = open(tmp_file, 'wb')
|
f = open(tmp_file, 'wb')
|
||||||
|
Reference in New Issue
Block a user