KCC: correctly update flags when repsFrom schedule is changed
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 24 Mar 2015 22:53:26 +0000 (11:53 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 29 May 2015 04:58:26 +0000 (06:58 +0200)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/scripting/bin/samba_kcc

index cd584029880958355205d949ea8d15b2b273f8dc..e27bc292b0be85adac1703c53281f85d38a9c467 100755 (executable)
@@ -535,7 +535,9 @@ class KCC(object):
         return None
 
     def modify_repsFrom(self, n_rep, t_repsFrom, s_rep, s_dsa, cn_conn):
-        """Update t_repsFrom if necessary to satisfy requirements. Such
+        """Part of MS-ADTS 6.2.2.5.
+
+        Update t_repsFrom if necessary to satisfy requirements. Such
         updates are typically required when the IDL_DRSGetNCChanges
         server has moved from one site to another--for example, to
         enable compression when the server is moved from the
@@ -563,11 +565,11 @@ class KCC(object):
         else:
             same_site = False
 
-        times = convert_schedule_to_repltimes(cn_conn.schedule)
-
         # if schedule doesn't match then update and modify
+        times = convert_schedule_to_repltimes(cn_conn.schedule)
         if times != t_repsFrom.schedule:
             t_repsFrom.schedule = times
+            update |= drsuapi.DRSUAPI_DRS_UPDATE_SCHEDULE
 
         # Bit DRS_PER_SYNC is set in replicaFlags if and only
         # if nTDSConnection schedule has a value v that specifies