]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:samba:netcmd: Fix code spelling
authorAndreas Schneider <asn@samba.org>
Tue, 6 Jun 2023 11:17:58 +0000 (13:17 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 23 Jun 2023 13:44:31 +0000 (13:44 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
14 files changed:
python/samba/netcmd/__init__.py
python/samba/netcmd/common.py
python/samba/netcmd/dns.py
python/samba/netcmd/domain/backup.py
python/samba/netcmd/domain/classicupgrade.py
python/samba/netcmd/domain/provision.py
python/samba/netcmd/domain/trust.py
python/samba/netcmd/drs.py
python/samba/netcmd/gpo.py
python/samba/netcmd/ldapcmp.py
python/samba/netcmd/ou.py
python/samba/netcmd/schema.py
python/samba/netcmd/user.py
python/samba/netcmd/visualize.py

index e69da388f36de60d5a45715bd07f6623c5c22bf5..2e7222437151aab0426f41922be8b311ff48bc5d 100644 (file)
@@ -205,9 +205,9 @@ class Command(object):
             self.apply_colour_choice(kwargs.pop('color', 'auto'))
 
         # Check for a min a max number of allowed arguments, whenever possible
-        # The suffix "?" means zero or one occurence
-        # The suffix "+" means at least one occurence
-        # The suffix "*" means zero or more occurences
+        # The suffix "?" means zero or one occurrence
+        # The suffix "+" means at least one occurrence
+        # The suffix "*" means zero or more occurrences
         min_args = 0
         max_args = 0
         undetermined_max_args = False
index 4cdccd073baaf49e06b4724bcd0e70714705430e..f9f212e53fb59b432f09ef067ebfed03e73e57fe 100644 (file)
@@ -97,7 +97,7 @@ def netcmd_get_domain_infos_via_cldap(lp, creds, address=None):
 def is_printable_attr_val(val):
     import unicodedata
 
-    # The value must be convertable to a string value.
+    # The value must be convertible to a string value.
     try:
         str_val = str(val)
     except:
index d40f01fa1cd3f73dfd6f5bc7967c4a3fc0d7f567..693fc9aa65f3d2ec24048359d22a150452503598 100644 (file)
@@ -68,7 +68,7 @@ class DnsConnWrapper:
 
         dns_conn = DnsConnWrapper(server, lp, creds)
 
-    then various common errors (for example, mispelled zones) on
+    then various common errors (for example, misspelled zones) on
     common operations will raise CommandErrors that turn into
     relatively nice messages (when compared to tracebacks).
 
index fe667c85632a614daceb7742413efd1b88aac940..40779e58bb6b14b26764d3ca5441e79b9ee47835 100644 (file)
@@ -783,7 +783,7 @@ class cmd_domain_backup_rename(samba.netcmd.Command):
     # Updates the CN=<domain>,CN=Partitions,CN=Configuration,... object to
     # reflect the domain rename
     def rename_domain_partition(self, logger, samdb, new_netbios_name):
-        '''Renames the domain parition object and updates its nETBIOSName'''
+        '''Renames the domain partition object and updates its nETBIOSName'''
 
         # lookup the crossRef object that holds the nETBIOSName (nCName has
         # already been updated by this point, but the netBIOS hasn't)
index 4a8b90b5f2909272d6fc1e0cf3b508d15d0d5713..5b6a8a8decb14147e9d1085543bea8c56c1d1e25 100644 (file)
@@ -89,7 +89,7 @@ class cmd_domain_classicupgrade(Command):
                metavar="[yes|no|auto]",
                help="Define if we should use the native fs capabilities or a tdb file for "
                "storing attributes likes ntacl when --use-ntvfs is set. "
-               "auto tries to make an inteligent guess based on the user rights and system capabilities",
+               "auto tries to make an intelligent guess based on the user rights and system capabilities",
                default="auto")
     ]
     if samba.is_ntvfs_fileserver_built():
index aa87accd13eb7e217ee251f6c47611854f1f0286..8f13e541f02c4423ed39c36ea8bba3fdd0e1451e 100644 (file)
@@ -128,7 +128,7 @@ class cmd_domain_provision(Command):
                metavar="[yes|no|auto]",
                help="Define if we should use the native fs capabilities or a tdb file for "
                "storing attributes likes ntacl when --use-ntvfs is set. "
-               "auto tries to make an inteligent guess based on the user rights and system capabilities",
+               "auto tries to make an intelligent guess based on the user rights and system capabilities",
                default="auto")
     ]
 
@@ -266,7 +266,7 @@ class cmd_domain_provision(Command):
 
         if adprep_level is None:
             # Select the adprep_level default based
-            # on what the base schema premits
+            # on what the base schema permits
             if base_schema in ["2008_R2", "2008_R2_old"]:
                 # without explicit --adprep-level=2008_R2
                 # we will skip the adprep step on
index 361cb2900fd1fe2b72997ffcc6442da1af2f6f90..e930f0006bb15fc7ff36cb9d77484697129bce40 100644 (file)
@@ -1314,7 +1314,7 @@ class cmd_domain_trust_delete(DomainTrustCommand):
             if remote_lsa_info.sid != local_tdo_info.sid or \
                remote_lsa_info.name.string != local_tdo_info.netbios_name.string or \
                remote_lsa_info.dns_domain.string != local_tdo_info.domain_name.string:
-                raise CommandError("LocalTDO inconsistend: Netbios[%s] DNS[%s] SID[%s]" % (
+                raise CommandError("LocalTDO inconsistent: Netbios[%s] DNS[%s] SID[%s]" % (
                                    local_tdo_info.netbios_name.string,
                                    local_tdo_info.domain_name.string,
                                    local_tdo_info.sid))
@@ -1334,7 +1334,7 @@ class cmd_domain_trust_delete(DomainTrustCommand):
                 if local_lsa_info.sid != remote_tdo_info.sid or \
                    local_lsa_info.name.string != remote_tdo_info.netbios_name.string or \
                    local_lsa_info.dns_domain.string != remote_tdo_info.domain_name.string:
-                    raise CommandError("RemoteTDO inconsistend: Netbios[%s] DNS[%s] SID[%s]" % (
+                    raise CommandError("RemoteTDO inconsistent: Netbios[%s] DNS[%s] SID[%s]" % (
                                        remote_tdo_info.netbios_name.string,
                                        remote_tdo_info.domain_name.string,
                                        remote_tdo_info.sid))
index 6a4063a91d696cd807b054e74c90d32935b74057..26cedec14a5587a24d6a1d595cf2081f7d579400 100644 (file)
@@ -106,11 +106,11 @@ class cmd_drs_showrepl(Command):
                                   "from this server"),
                dest='format', action='store_const', const='summary'),
         Option("--pull-summary", help=("Have we successfully replicated "
-                                       "from all relevent servers?"),
+                                       "from all relevant servers?"),
                dest='format', action='store_const', const='pull_summary'),
         Option("--notify-summary", action='store_const',
                const='notify_summary', dest='format',
-               help=("Have we successfully notified all relevent servers of "
+               help=("Have we successfully notified all relevant servers of "
                      "local changes, and did they say they successfully "
                      "replicated?")),
         Option("--classic", help="print local replication details",
index 16c6e94689f15f84e301fbb926f12a66a9babbc8..67c13b07fe5c1dcf3b0a07ad0b4c944aad30bd6e 100644 (file)
@@ -2815,7 +2815,8 @@ samba-tool gpo manage symlink add {31B2F340-016D-11D2-945F-00C04FB984F9} /tmp/so
 class cmd_remove_symlink(GPOCommand):
     """Removes a VGP Symbolic Link Group Policy from the sysvol
 
-This command removes a symlink setting from the sysvol from appling to winbind clients.
+This command removes a symlink setting from the sysvol from applying to winbind
+clients.
 
 Example:
 samba-tool gpo manage symlink remove {31B2F340-016D-11D2-945F-00C04FB984F9} /tmp/source /tmp/target
index ff26e96332d0e03e3bc41db697c541ff3aacae08..6936e9ce1f9fa7dc9702c3a52cd0ed988e85dfed 100644 (file)
@@ -278,7 +278,7 @@ class Descriptor(object):
             self.dacl_list.sort()
 
     def extract_dacl(self):
-        """ Extracts the DACL as a list of ACE string (with the brakets).
+        """ Extracts the DACL as a list of ACE string (with the brackets).
         """
         try:
             if "S:" in self.sddl:
@@ -876,7 +876,7 @@ class cmd_ldapcmp(Command):
         Option("-v", "--verbose", dest="verbose", action="store_true", default=False,
                help="Print all DN pairs that have been compared"),
         Option("--sd", dest="descriptor", action="store_true", default=False,
-               help="Compare nTSecurityDescriptor attibutes only"),
+               help="Compare nTSecurityDescriptor attributes only"),
         Option("--sort-aces", dest="sort_aces", action="store_true", default=False,
                help="Sort ACEs before comparison of nTSecurityDescriptor attribute"),
         Option("--view", dest="view", default="section", choices=["section", "collision"],
@@ -888,7 +888,7 @@ class cmd_ldapcmp(Command):
         Option("--scope", dest="scope", default="SUB", choices=["SUB", "ONE", "BASE"],
                help="Pass search scope that builds DN list. Options: SUB, ONE, BASE"),
         Option("--filter", dest="filter", default="",
-               help="List of comma separated attributes to ignore in the comparision"),
+               help="List of comma separated attributes to ignore in the comparison"),
         Option("--skip-missing-dn", dest="skip_missing_dn", action="store_true", default=False,
                help="Skip report and failure due to missing DNs in one server or another"),
     ]
index ce068716a013e8f7e36b742d00816f1b88f8a627..71f61e42ab6e8f9e4d7553a513c70acbba561a08 100644 (file)
@@ -254,21 +254,21 @@ class cmd_listobjects(Command):
         except Exception as e:
             raise CommandError('Invalid ou_dn "%s": %s' % (ou_dn, e))
 
-        minchilds = 0
+        minchildren = 0
         scope = ldb.SCOPE_ONELEVEL
         if recursive:
-            minchilds = 1
+            minchildren = 1
             scope = ldb.SCOPE_SUBTREE
 
         try:
-            childs = samdb.search(base=full_ou_dn,
-                                  expression="(objectclass=*)",
-                                  scope=scope, attrs=[])
-            if len(childs) <= minchilds:
+            children = samdb.search(base=full_ou_dn,
+                                    expression="(objectclass=*)",
+                                    scope=scope, attrs=[])
+            if len(children) <= minchildren:
                 self.outf.write('ou "%s" is empty\n' % ou_dn)
                 return
 
-            for child in sorted(childs, key=attrgetter('dn')):
+            for child in sorted(children, key=attrgetter('dn')):
                 if child.dn == full_ou_dn:
                     continue
                 if not full_dn:
index d322da015ae54fee39726f4cb9105d82ab7d0bd0..e665e834a0493e05e5e9a788523ac29232cb73b2 100644 (file)
@@ -57,7 +57,7 @@ class cmd_schema_attribute_modify(Command):
           substring queries.
     fSUBTREEATTINDEX: create a browsing index for this attribute. VLV searches
           require this.
-    fCONFIDENTIAL: indicate that the attribute is confidental and requires
+    fCONFIDENTIAL: indicate that the attribute is confidential and requires
           special access checks.
     fNEVERVALUEAUDIT: indicate that changes to this value should NOT be audited.
     fRODCFILTEREDATTRIBUTE: indicate that this value should not be replicated to
index 50d800ed04a078c09b68815cd8c9e33f9441805f..c292def0985d407b3eacfad1e5a799372fb65446 100644 (file)
@@ -2508,7 +2508,7 @@ samba-tool user syncpasswords --terminate \\
         def update_pid(pid):
             if self.lockfd != -1:
                 got_exclusive = False
-                # Try 5 times to get the exclusiv lock.
+                # Try 5 times to get the exclusive lock.
                 for i in range(0, 5):
                     try:
                         fcntl.lockf(self.lockfd, fcntl.LOCK_EX | fcntl.LOCK_NB)
@@ -2665,7 +2665,7 @@ samba-tool user syncpasswords --terminate \\
 
             for msg in notify_handle:
                 if not isinstance(msg, ldb.Message):
-                    self.outf.write("referal: %s\n" % msg)
+                    self.outf.write("referral: %s\n" % msg)
                     continue
                 created = msg.get("uSNCreated")[0]
                 changed = msg.get("uSNChanged")[0]
@@ -2726,11 +2726,11 @@ samba-tool user syncpasswords --terminate \\
                 log_msg("No process running.\n")
                 return
             if not conflict:
-                log_msg("Proccess %d is not running anymore.\n" % (
+                log_msg("Process %d is not running anymore.\n" % (
                         self.current_pid))
                 update_pid(None)
                 return
-            log_msg("Sending SIGTERM to proccess %d.\n" % (
+            log_msg("Sending SIGTERM to process %d.\n" % (
                     self.current_pid))
             os.kill(self.current_pid, signal.SIGTERM)
             return
index 7d84934c6542343901e6b1a1c0a3263cc4b97d9e..689d577ff8749bf792abe855a2194202222e9a86 100644 (file)
@@ -151,7 +151,7 @@ class GraphCommand(Command):
 
     def calc_distance_color_scheme(self, color_scheme, output):
         """Heuristics to work out the colour scheme for distance matrices.
-        Returning None means no colour, otherwise it sould be a colour
+        Returning None means no colour, otherwise it should be a colour
         from graph.COLOUR_SETS"""
         if color_scheme is not None:
             # --color-scheme implies --color=yes for *this* purpose.