mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +03:00
python:samba: Fix code spelling
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jun 23 14:51:14 UTC 2023 on atb-devel-224
This commit is contained in:
parent
d4798967c0
commit
c837ecf442
@ -169,7 +169,7 @@ class Ldb(_Ldb):
|
||||
# Try to delete user/computer accounts to allow deletion of groups
|
||||
self.erase_users_computers(basedn)
|
||||
|
||||
# Delete the 'visible' records, and the invisble 'deleted' records (if
|
||||
# Delete the 'visible' records, and the invisible 'deleted' records (if
|
||||
# this DB supports it)
|
||||
for msg in self.search(basedn, ldb.SCOPE_SUBTREE,
|
||||
"(&(|(objectclass=*)(distinguishedName=*))(!(distinguishedName=@BASEINFO)))",
|
||||
@ -260,7 +260,7 @@ def substitute_var(text, values):
|
||||
"""Substitute strings of the form ${NAME} in str, replacing
|
||||
with substitutions from values.
|
||||
|
||||
:param text: Text in which to subsitute.
|
||||
:param text: Text in which to substitute.
|
||||
:param values: Dictionary with keys and values.
|
||||
"""
|
||||
|
||||
@ -293,7 +293,7 @@ def read_and_sub_file(file_name, subst_vars):
|
||||
"""Read a file and sub in variables found in it
|
||||
|
||||
:param file_name: File to be read (typically from setup directory)
|
||||
param subst_vars: Optional variables to subsitute in the file.
|
||||
param subst_vars: Optional variables to substitute in the file.
|
||||
"""
|
||||
with open(file_name, 'r', encoding="utf-8") as data_file:
|
||||
data = data_file.read()
|
||||
|
@ -2477,7 +2477,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
|
||||
if attrname.lower() == 'objectclass':
|
||||
normalised = self.samdb.dsdb_normalise_attributes(self.samdb_schema, attrname, obj[attrname])
|
||||
# Do not consider the attribute incorrect if:
|
||||
# - The sorted (alphabetically) list is the same, inclding case
|
||||
# - The sorted (alphabetically) list is the same, including case
|
||||
# - The first and last elements are the same
|
||||
#
|
||||
# This avoids triggering an error due to
|
||||
|
@ -630,7 +630,7 @@ def get_diff_sds(refsd, cursd, domainsid, checkSacl=True):
|
||||
"""Get the difference between 2 sd
|
||||
|
||||
This function split the textual representation of ACL into smaller
|
||||
chunck in order to not to report a simple permutation as a difference
|
||||
chunk in order to not to report a simple permutation as a difference
|
||||
|
||||
:param refsddl: First sddl to compare
|
||||
:param cursddl: Second sddl to compare
|
||||
|
@ -314,7 +314,7 @@ def dns_name_equal(n1, n2):
|
||||
|
||||
|
||||
def ipv6_normalise(addr):
|
||||
"""Convert an AAAA adresss into a canonical form."""
|
||||
"""Convert an AAAA address into a canonical form."""
|
||||
packed = socket.inet_pton(socket.AF_INET6, addr)
|
||||
return socket.inet_ntop(socket.AF_INET6, packed)
|
||||
|
||||
|
@ -51,7 +51,7 @@ update_map = {
|
||||
# No updates
|
||||
# Windows Server 2016 - version 15
|
||||
82: "83c53da7-427e-47a4-a07a-a324598b88f7",
|
||||
# from the documentation and a fresh installtion
|
||||
# from the documentation and a fresh installation
|
||||
# 83 is this:
|
||||
# c81fc9cc-0130-4fd1-b272-634d74818133
|
||||
# adprep will use this on the wire:
|
||||
|
@ -449,7 +449,7 @@ class drs_ReplicateRenamer(drs_Replicate):
|
||||
ctr.naming_context.dn = self.rename_dn(ctr.naming_context.dn)
|
||||
|
||||
# rename the first object in each partition. This will cause every
|
||||
# subsequent object in the partiton to be renamed as a side-effect
|
||||
# subsequent object in the partition to be renamed as a side-effect
|
||||
if first_chunk and ctr.object_count != 0:
|
||||
self.rename_top_level_object(ctr.first_object.object)
|
||||
|
||||
|
@ -1055,7 +1055,7 @@ class DCJoinContext(object):
|
||||
print("Done with always replicated NC (base, config, schema)")
|
||||
|
||||
# At this point we should already have an entry in the ForestDNS
|
||||
# and DomainDNS NC (those under CN=Partions,DC=...) in order to
|
||||
# and DomainDNS NC (those under CN=Partitions,DC=...) in order to
|
||||
# indicate that we hold a replica for this NC.
|
||||
for nc in (ctx.domaindns_zone, ctx.forestdns_zone):
|
||||
if nc in ctx.nc_list:
|
||||
@ -1340,7 +1340,7 @@ class DCJoinContext(object):
|
||||
# Note: as RODC the invocationId is only stored
|
||||
# on the RODC itself, the other DCs never see it.
|
||||
#
|
||||
# Thats is why we fix up the replPropertyMetaData stamp
|
||||
# That's is why we fix up the replPropertyMetaData stamp
|
||||
# for the 'invocationId' attribute, we need to change
|
||||
# the 'version' to '0', this is what windows 2008r2 does as RODC
|
||||
#
|
||||
|
@ -210,7 +210,7 @@ def innertext(tag):
|
||||
|
||||
def read_ms_markdown(in_file, out_folder=None, out_dict=None):
|
||||
"""
|
||||
Read Github documentation to produce forest wide udpates
|
||||
Read Github documentation to produce forest wide updates
|
||||
:param in_file: Forest-Wide-Updates.md
|
||||
:param out_folder: output folder
|
||||
:param out_dict: output dictionary
|
||||
|
@ -497,9 +497,9 @@ def backup_online(smb_conn, dest_tarfile_path, dom_sid):
|
||||
|
||||
1. Create a temp dir as container dir
|
||||
2. Backup all files with dir structure into container dir
|
||||
3. Generate file.NTACL files for each file and dir in contianer dir
|
||||
3. Generate file.NTACL files for each file and dir in container dir
|
||||
4. Create a tar file from container dir(without top level folder)
|
||||
5. Delete contianer dir
|
||||
5. Delete container dir
|
||||
"""
|
||||
|
||||
logger = get_samba_logger()
|
||||
|
@ -211,7 +211,7 @@ class RegistryGroupPolicies(object):
|
||||
ext_name_guid = GUID(ext_name)
|
||||
except samba.NTSTATUSError as e:
|
||||
if e.args[0] == NT_STATUS_INVALID_PARAMETER:
|
||||
raise SyntaxError('Extension name not formated correctly')
|
||||
raise SyntaxError('Extension name not formatted correctly')
|
||||
raise
|
||||
if ext_attr not in ['gPCMachineExtensionNames',
|
||||
'gPCUserExtensionNames']:
|
||||
|
@ -130,7 +130,7 @@ def remove_dns_references(samdb, logger, dnsHostName, ignore_no_name=False):
|
||||
# default. This is by default all the partitions of type
|
||||
# domainDNS. By finding the canocial name of all the partitions,
|
||||
# we find the likely candidates. We only remove the record if it
|
||||
# maches the IP that was used by the dnsHostName. This avoids us
|
||||
# matches the IP that was used by the dnsHostName. This avoids us
|
||||
# needing to look a the dns_update_list file from in the demote
|
||||
# script.
|
||||
|
||||
@ -428,7 +428,7 @@ def remove_dc(samdb, logger, dc_name):
|
||||
"Failure checking if %s is an NTDS DSA in %s: %s" %
|
||||
(ntds_dn, samdb.domain_dns_name(), estr))
|
||||
|
||||
# If the NTDS Settings child DN wasn't found or wasnt an ntdsDSA
|
||||
# If the NTDS Settings child DN wasn't found or wasn't an ntdsDSA
|
||||
# object, just remove the server object located above
|
||||
if (len(ntds_msgs) == 0):
|
||||
if server_dn is None:
|
||||
|
@ -491,7 +491,7 @@ member: %s
|
||||
if attr_value is None and attr_name in old_attrs:
|
||||
attrs[attr_name] = str(old_attrs[attr_name])
|
||||
|
||||
# add '.' to initials if initals are not None and not "" and if the initials
|
||||
# add '.' to initials if initials are not None and not "" and if the initials
|
||||
# don't have already a '.' at the end
|
||||
if attrs["initials"] and not attrs["initials"].endswith('.'):
|
||||
attrs["initials"] += '.'
|
||||
@ -1335,7 +1335,7 @@ schemaUpdateNow: 1
|
||||
"""Creates an organizationalUnit object
|
||||
:param ou_dn: dn of the new object
|
||||
:param description: description attribute
|
||||
:param name: name atttribute
|
||||
:param name: name attribute
|
||||
:param sd: security descriptor of the object, can be
|
||||
an SDDL string or security.descriptor type
|
||||
"""
|
||||
|
@ -132,8 +132,8 @@ def get_ldbs(paths, creds, session, lp):
|
||||
"""Return LDB object mapped on most important databases
|
||||
|
||||
:param paths: An object holding the different importants paths for provision object
|
||||
:param creds: Credential used for openning LDB files
|
||||
:param session: Session to use for openning LDB files
|
||||
:param creds: Credential used for opening LDB files
|
||||
:param session: Session to use for opening LDB files
|
||||
:param lp: A loadparam object
|
||||
:return: A ProvisionLDB object that contains LDB object for the different LDB files of the provision"""
|
||||
|
||||
@ -240,7 +240,7 @@ def newprovision(names, session, smbconf, provdir, logger, base_schema=None, adp
|
||||
since the latest upgrade in the current provision
|
||||
|
||||
:param names: List of provision parameters
|
||||
:param creds: Credentials for the authentification
|
||||
:param creds: Credentials for the authentication
|
||||
:param session: Session object
|
||||
:param smbconf: Path to the smb.conf file
|
||||
:param provdir: Directory where the provision will be stored
|
||||
@ -504,8 +504,8 @@ def delta_update_basesamdb(refsampath, sampath, creds, session, lp, message):
|
||||
|
||||
:param refsampath: Path to the samdb in the reference provision
|
||||
:param sampath: Path to the samdb in the upgraded provision
|
||||
:param creds: Credential used for openning LDB files
|
||||
:param session: Session to use for openning LDB files
|
||||
:param creds: Credential used for opening LDB files
|
||||
:param session: Session to use for opening LDB files
|
||||
:param lp: A loadparam object
|
||||
:return: A msg_diff object with the difference between the @ATTRIBUTES
|
||||
of the current provision and the reference provision
|
||||
@ -765,7 +765,7 @@ def findprovisionrange(samdb, basedn):
|
||||
|
||||
|
||||
def print_provision_ranges(dic, limit_print, dest, samdb_path, invocationid):
|
||||
""" print the differents ranges passed as parameter
|
||||
""" print the different ranges passed as parameter
|
||||
|
||||
:param dic: A dictionary as returned by findprovisionrange
|
||||
:param limit_print: minimum number of object in a range in order to print it
|
||||
|
Loading…
Reference in New Issue
Block a user