summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-18 03:45:38 +0100
committerGünther Deschner <gd@samba.org>2008-11-18 16:05:10 +0100
commit6aaf220f9e20815a32d166c1c5953e41152e1c99 (patch)
treedac288172e40c73cc45c5072fd10266d16b66c62 /source3/libnet
parent90513515096f0b82d3e9d1cb23df73aa26f267a8 (diff)
downloadsamba-6aaf220f9e20815a32d166c1c5953e41152e1c99.tar.gz
samba-6aaf220f9e20815a32d166c1c5953e41152e1c99.tar.bz2
samba-6aaf220f9e20815a32d166c1c5953e41152e1c99.zip
s3-libnet-samsync: use netr_DatabaseDeltas unless full replication enforced.
Guenther
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_samsync.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/libnet/libnet_samsync.c b/source3/libnet/libnet_samsync.c
index 43891ce829..5711b231c7 100644
--- a/source3/libnet/libnet_samsync.c
+++ b/source3/libnet/libnet_samsync.c
@@ -376,7 +376,8 @@ static NTSTATUS libnet_samsync_delta(enum netr_SamDatabaseID database_id,
netlogon_creds_client_step(ctx->cli->dc, &credential);
- if (ctx->single_object_replication) {
+ if (ctx->single_object_replication &&
+ !ctx->force_full_replication) {
result = rpccli_netr_DatabaseRedo(ctx->cli, mem_ctx,
logon_server,
computername,
@@ -385,6 +386,16 @@ static NTSTATUS libnet_samsync_delta(enum netr_SamDatabaseID database_id,
*e,
0,
&delta_enum_array);
+ } else if (!ctx->force_full_replication && (sequence_num > 0)) {
+ result = rpccli_netr_DatabaseDeltas(ctx->cli, mem_ctx,
+ logon_server,
+ computername,
+ &credential,
+ &return_authenticator,
+ database_id,
+ &sequence_num,
+ &delta_enum_array,
+ 0xffff);
} else {
result = rpccli_netr_DatabaseSync2(ctx->cli, mem_ctx,
logon_server,