1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source4/libnet
Tim Beale 89cf5c3f76 replmd: Don't fail cycle if we get link for deleted object with GET_TGT
We are going to end up supporting 2 different server schemes:
A. the old/default behaviour of sending all the linked attributes last,
   at the end of the replication cycle.
B. the new/Microsoft way of sending the linked attributes interleaved
   with the source/target objects.

Normally if we're talking to a server using the old scheme-A, we won't
ever use the GET_TGT flag. However, there are a couple of cases where
it can happen:
- A link to a new object was added during the replication cycle.
- An object was deleted while the replication was in progress (and
the linked attribute got queued before the object was deleted).

Talking to an Samba DC running the old scheme will just cause it to
start the replication cycle from scratch again, which is fairly
harmless. However, there is a chance that the same thing can happen
again, in which case the replication cycle will fail (because GET_TGT
was already set).

Even if we're using the new scheme (B), we could still potentially hit
this case, as we can still queue up linked attributes between requests
(group memberships can be larger than what can fit into a single
replication chunk).

If GET_TGT is set in the GetNcChanges request, then the local copy of
the target object should always be up-to-date when we process the linked
attribute. So if we still think the target object is deleted/recycled at
this point, then it's safe to ignore the linked attribute (because we
know our local copy is up-to-date). This logic matches the MS spec logic
in ProcessLinkValue().

Not failing the replication cycle may be beneficial if we're trying to
do a full-sync of a large database. Otherwise it might be time-consuming
and frustrating to repeat the sync unnecessarily.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12972
2017-08-18 06:07:12 +02:00
..
composite.h
groupinfo.c
groupinfo.h
groupman.c
groupman.h
libnet_become_dc.c libnet: Initialize req_level in become_dc tests 2017-07-28 00:25:15 +02:00
libnet_become_dc.h dsdb: Rework DSDB code to use WERROR 2016-11-04 04:41:19 +01:00
libnet_domain.c
libnet_domain.h
libnet_export_keytab.c krb5_wrap: Rename smb_krb5_open_keytab_relative() 2016-08-31 20:59:15 +02:00
libnet_export_keytab.h
libnet_group.c
libnet_group.h
libnet_join.c libnet join: Fix error handling on provision_store_self_join failure 2017-05-25 06:28:02 +02:00
libnet_join.h
libnet_lookup.c
libnet_lookup.h
libnet_passwd.c
libnet_passwd.h
libnet_rpc.c s4:libnet: make use of dcerpc_secondary_auth_connection_send/recv() 2015-07-07 14:05:28 +02:00
libnet_rpc.h
libnet_samdump.c
libnet_samsync_ldb.c libnet: Fix CID 1362934: CHECKED_RETURN 2016-06-28 18:48:07 +02:00
libnet_samsync.c
libnet_samsync.h
libnet_share.c s4:libnet: fix 'Syscall param writev(vector[...])' valgrind error 2016-04-25 10:35:14 +02:00
libnet_share.h
libnet_site.c s4-libnet: make it possible to join "off-site". 2014-10-24 13:50:30 +02:00
libnet_site.h
libnet_time.c
libnet_time.h
libnet_unbecome_dc.c Order switch statements 2014-07-07 07:47:44 +02:00
libnet_unbecome_dc.h
libnet_user.c
libnet_user.h
libnet_vampire.c replmd: Don't fail cycle if we get link for deleted object with GET_TGT 2017-08-18 06:07:12 +02:00
libnet_vampire.h
libnet.c
libnet.h
prereq_domain.c
py_net_dckeytab.c
py_net.c py3: Make sure to specify METH_VARARGS together with METH_KEYWORDS 2017-07-14 07:10:24 +02:00
py_net.h
userinfo.c
userinfo.h
userman.c Fix the O3 developer build 2015-03-03 13:14:53 +01:00
userman.h
wscript_build waf: disable-python - don't build samba-net 2017-03-10 07:31:13 +01:00