summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2023-06-06 13:31:52 +0200
committerAndreas Schneider <asn@cryptomilk.org>2023-06-23 14:51:14 +0000
commitc837ecf442cfb8e19abaa917ff61f323a41829fd (patch)
treedde037bc28c36c5053f141e6f2e2b4da1b775a3e /python
parentd4798967c00bd78f102acb9cba8641390072fbdc (diff)
downloadsamba-c837ecf442cfb8e19abaa917ff61f323a41829fd.tar.gz
samba-c837ecf442cfb8e19abaa917ff61f323a41829fd.tar.bz2
samba-c837ecf442cfb8e19abaa917ff61f323a41829fd.zip
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
Diffstat (limited to 'python')
-rw-r--r--python/samba/__init__.py6
-rw-r--r--python/samba/dbchecker.py2
-rw-r--r--python/samba/descriptor.py2
-rw-r--r--python/samba/dnsserver.py2
-rw-r--r--python/samba/domain_update.py2
-rw-r--r--python/samba/drs_utils.py2
-rw-r--r--python/samba/join.py4
-rw-r--r--python/samba/ms_forest_updates_markdown.py2
-rw-r--r--python/samba/ntacls.py4
-rw-r--r--python/samba/policies.py2
-rw-r--r--python/samba/remove_dc.py4
-rw-r--r--python/samba/samdb.py4
-rw-r--r--python/samba/upgradehelpers.py12
13 files changed, 24 insertions, 24 deletions
diff --git a/python/samba/__init__.py b/python/samba/__init__.py
index c4ddf18da60..2f0570f19ad 100644
--- a/python/samba/__init__.py
+++ b/python/samba/__init__.py
@@ -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()
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py
index c9341f6500c..419f57acfba 100644
--- a/python/samba/dbchecker.py
+++ b/python/samba/dbchecker.py
@@ -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
diff --git a/python/samba/descriptor.py b/python/samba/descriptor.py
index 17b995bbcbb..f0568dd9e8e 100644
--- a/python/samba/descriptor.py
+++ b/python/samba/descriptor.py
@@ -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
diff --git a/python/samba/dnsserver.py b/python/samba/dnsserver.py
index 86a2a6ceaf2..965977acdeb 100644
--- a/python/samba/dnsserver.py
+++ b/python/samba/dnsserver.py
@@ -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)
diff --git a/python/samba/domain_update.py b/python/samba/domain_update.py
index fd55027b780..feb03de860c 100644
--- a/python/samba/domain_update.py
+++ b/python/samba/domain_update.py
@@ -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:
diff --git a/python/samba/drs_utils.py b/python/samba/drs_utils.py
index 955d0f571f8..c443abddfd2 100644
--- a/python/samba/drs_utils.py
+++ b/python/samba/drs_utils.py
@@ -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)
diff --git a/python/samba/join.py b/python/samba/join.py
index e453aab1198..731d319badc 100644
--- a/python/samba/join.py
+++ b/python/samba/join.py
@@ -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
#
diff --git a/python/samba/ms_forest_updates_markdown.py b/python/samba/ms_forest_updates_markdown.py
index 5c5b27635f7..0a0d2111a72 100644
--- a/python/samba/ms_forest_updates_markdown.py
+++ b/python/samba/ms_forest_updates_markdown.py
@@ -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
diff --git a/python/samba/ntacls.py b/python/samba/ntacls.py
index d2fe6ed911e..93e364c6917 100644
--- a/python/samba/ntacls.py
+++ b/python/samba/ntacls.py
@@ -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()
diff --git a/python/samba/policies.py b/python/samba/policies.py
index 00ea07e47c9..aed7547c79d 100644
--- a/python/samba/policies.py
+++ b/python/samba/policies.py
@@ -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']:
diff --git a/python/samba/remove_dc.py b/python/samba/remove_dc.py
index 86d96c982b0..6a2808043a8 100644
--- a/python/samba/remove_dc.py
+++ b/python/samba/remove_dc.py
@@ -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:
diff --git a/python/samba/samdb.py b/python/samba/samdb.py
index e76bd7b24bd..a7fbbe359af 100644
--- a/python/samba/samdb.py
+++ b/python/samba/samdb.py
@@ -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
"""
diff --git a/python/samba/upgradehelpers.py b/python/samba/upgradehelpers.py
index 5a314762858..6920cea6583 100644
--- a/python/samba/upgradehelpers.py
+++ b/python/samba/upgradehelpers.py
@@ -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