From: Garming Sam Date: Wed, 20 Jul 2016 22:42:14 +0000 (+1200) Subject: samba_kcc: match translate connection from old KCC for RWDC X-Git-Tag: tdb-1.3.10~244 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5e0a2fef112f3edfaf6c3d61662f4ab5e4fe43f;p=thirdparty%2Fsamba.git samba_kcc: match translate connection from old KCC for RWDC This makes it so that repsTo are always regenerated on the target DCs. This also happens elsewhere in drepl_out, but is to be removed. Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/kcc/__init__.py b/python/samba/kcc/__init__.py index e4dfc7fd86f..192015af7e8 100644 --- a/python/samba/kcc/__init__.py +++ b/python/samba/kcc/__init__.py @@ -628,6 +628,12 @@ class KCC(object): if times != t_repsFrom.schedule: t_repsFrom.schedule = times + # Bit DRS_ADD_REF is set in replicaFlags unconditionally + # Samba ONLY: + if ((t_repsFrom.replica_flags & + drsuapi.DRSUAPI_DRS_ADD_REF) == 0x0): + t_repsFrom.replica_flags |= drsuapi.DRSUAPI_DRS_ADD_REF + # Bit DRS_PER_SYNC is set in replicaFlags if and only # if nTDSConnection schedule has a value v that specifies # scheduled replication is to be performed at least once