]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:samba:kcc: Fix code spelling
authorAndreas Schneider <asn@samba.org>
Tue, 6 Jun 2023 11:14:39 +0000 (13:14 +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>
python/samba/kcc/__init__.py
python/samba/kcc/graph.py
python/samba/kcc/kcc_utils.py
python/samba/kcc/ldif_import_export.py

index c87cc14fcff9a9bf9bd5fe3bab8ef05cc24b9283..709b84909b6b9a0f441442ff8326ab8eac20c1d8 100644 (file)
@@ -581,7 +581,7 @@ class KCC(object):
                 if connect.to_be_modified:
                     logger.info("TO BE MODIFIED:\n%s" % connect)
 
-            # Peform deletion from our tables but perform
+            # Perform deletion from our tables but perform
             # no database modification
             dsa.commit_connections(self.samdb, ro=True)
         else:
@@ -764,7 +764,7 @@ class KCC(object):
         #     IF (same-site) OR (no-value) OR (type-ip)
         #
         # because IP should be the primary transport mechanism
-        # (even in inter-site) and the absense of the transportType
+        # (even in inter-site) and the absence of the transportType
         # attribute should always imply IP no matter if its multi-site
         #
         # NOTE MS-TECH INCORRECT:
@@ -1032,7 +1032,7 @@ class KCC(object):
                 if text:
                     logger.info("TO BE MODIFIED:\n%s" % text)
 
-                # Peform deletion from our tables but perform
+                # Perform deletion from our tables but perform
                 # no database modification
                 n_rep.commit_repsFrom(self.samdb, ro=True)
             else:
@@ -1097,7 +1097,7 @@ class KCC(object):
                     if rt.to_be_deleted:
                         logger.info("REMOVING REPS-TO: %s" % rt)
 
-                # Peform deletion from our tables but perform
+                # Perform deletion from our tables but perform
                 # no database modification
                 n_rep.commit_repsTo(self.samdb, ro=True)
             else:
@@ -2130,7 +2130,7 @@ class KCC(object):
         # XXX This loop and the previous one differ only in whether
         # the replica is partial or not. here we only accept partial
         # (because we're partial); before we only accepted full. Order
-        # doen't matter (the list is sorted a few lines down) so these
+        # doesn't matter (the list is sorted a few lines down) so these
         # loops could easily be merged. Or this could be a helper
         # function.
 
@@ -2707,7 +2707,7 @@ class KCC(object):
         """Import relevant objects and attributes from an LDIF file.
 
         The point of this function is to allow a programmer/debugger to
-        import an LDIF file with non-security relevent information that
+        import an LDIF file with non-security relevant information that
         was previously extracted from a DC database.  The LDIF file is used
         to create a temporary abbreviated database.  The KCC algorithm can
         then run against this abbreviated database for debug or test
@@ -2732,7 +2732,7 @@ class KCC(object):
         """Save KCC relevant details to an ldif file
 
         The point of this function is to allow a programmer/debugger to
-        extract an LDIF file with non-security relevent information from
+        extract an LDIF file with non-security relevant information from
         a DC database.  The LDIF file can then be used to "import" via
         the import_ldif() function this file into a temporary abbreviated
         database.  The KCC algorithm can then run against this abbreviated
index d3044dd90b87c437516c640bc72b2795549e6bee..63f1c3adc168976eb92e47143466c2ec747233f1 100644 (file)
@@ -49,7 +49,7 @@ class ReplInfo(object):
     def set_repltimes_from_schedule(self, schedule):
         """Convert the schedule and calculate duration
 
-        :param schdule: the schedule to convert
+        :param schedule: the schedule to convert
         """
         self.schedule = convert_schedule_to_repltimes(schedule)
         self.duration = total_schedule(self.schedule)
index bc2838e39338d4fb837424c124115802010ade64..ed4fa39bbeb84f61ac7377b726aa6885fdab3816 100644 (file)
@@ -241,7 +241,7 @@ class NCReplica(NamingContext):
         # the same for all nTDSDSAs in the forest.  That
         # leaves the default domain NC remaining which
         # may be different for each nTDSDSAs (and thus
-        # we don't compare agains this samdb's default
+        # we don't compare against this samdb's default
         # basedn
         elif attr == "hasMasterNCs":
             self.rep_present_criteria_one = True
@@ -733,7 +733,7 @@ class DirectoryServiceAgent(object):
             # Our response will contain a number of elements including
             # the dn of the dsa as well as elements for each
             # attribute (e.g. hasMasterNCs).  Each of these elements
-            # is a dictonary list which we retrieve the keys for and
+            # is a dictionary list which we retrieve the keys for and
             # then iterate over them
             for k in res[0].keys():
                 if k == "dn":
@@ -811,7 +811,7 @@ class DirectoryServiceAgent(object):
         deleted
 
         :param samdb: database to commit DSA connection list to
-        :param ro: if (true) then peform internal operations but
+        :param ro: if (true) then perform internal operations but
             do not write to the database (readonly)
         """
         delconn = []
@@ -884,8 +884,8 @@ class DirectoryServiceAgent(object):
         if sched is not None:
             connect.schedule = sched
         else:
-            # Create schedule.  Attribute valuse set according to MS-TECH
-            # intrasite connection creation document
+            # Create schedule.  Attribute value set according to MS-TECH
+            # intra-site connection creation document
             connect.schedule = new_connection_schedule()
 
         self.add_connection(dnstr, connect)
@@ -1062,7 +1062,7 @@ class NTDSConnection(object):
             return
 
         # First verify we don't have this entry to ensure nothing
-        # is programatically amiss
+        # is programmatically amiss
         found = False
         try:
             msg = samdb.search(base=self.dnstr, scope=ldb.SCOPE_BASE)
@@ -1133,7 +1133,7 @@ class NTDSConnection(object):
             return
 
         # First verify we have this entry to ensure nothing
-        # is programatically amiss
+        # is programmatically amiss
         try:
             # we don't use the search result, but it tests the status
             # of self.dnstr in the database.
@@ -1597,7 +1597,7 @@ class Site(object):
         #       so it appears we have to turn f into the same interval
         #
         #       interSiteTopologyFailover (if set) appears to be in minutes
-        #       so we'll need to convert to senconds and then 100 nanosecond
+        #       so we'll need to convert to seconds and then 100 nanosecond
         #       intervals
         #       XXX [MS-ADTS] 6.2.2.3.1 says it is seconds, not minutes.
         #
index 578330dda0e4c7da815fcb863f64e96dd11ecc15..41f0fd75778c3e6300a92bcc5b93226183a7c4eb 100644 (file)
@@ -37,11 +37,11 @@ def write_search_result(samdb, f, res):
 
 
 def ldif_to_samdb(dburl, lp, ldif_file, forced_local_dsa=None):
-    """Routine to import all objects and attributes that are relevent
+    """Routine to import all objects and attributes that are relevant
     to the KCC algorithms from a previously exported LDIF file.
 
     The point of this function is to allow a programmer/debugger to
-    import an LDIF file with non-security relevent information that
+    import an LDIF file with non-security relevant information that
     was previously extracted from a DC database.  The LDIF file is used
     to create a temporary abbreviated database.  The KCC algorithm can
     then run against this abbreviated database for debug or test
@@ -90,11 +90,11 @@ dsServiceName: CN=NTDS Settings,%s
 
 
 def samdb_to_ldif_file(samdb, dburl, lp, creds, ldif_file):
-    """Routine to extract all objects and attributes that are relevent
+    """Routine to extract all objects and attributes that are relevant
     to the KCC algorithms from a DC database.
 
     The point of this function is to allow a programmer/debugger to
-    extract an LDIF file with non-security relevent information from
+    extract an LDIF file with non-security relevant information from
     a DC database.  The LDIF file can then be used to "import" via
     the import_ldif() function this file into a temporary abbreviated
     database.  The KCC algorithm can then run against this abbreviated
@@ -231,7 +231,7 @@ def samdb_to_ldif_file(samdb, dburl, lp, creds, ldif_file):
                     if k in ncattrs:
                         for value in res_msg[k]:
                             # Some of these have binary DNs so
-                            # use dsdb_Dn to split out relevent parts
+                            # use dsdb_Dn to split out relevant parts
                             dsdn = dsdb_Dn(samdb, value.decode('utf8'))
                             dnstr = str(dsdn.dn)
                             if dnstr not in nclist: