1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

149 Commits

Author SHA1 Message Date
Kamen Mazdrashki
b954834ad1 s4-dreplsrv: Implement irpc stub to be used to force dreplsrv to update internal cache
This IRPC calls is to be used whenever repsFrom/repsTo are
changed by administrative tool or KCC (i.e. Topology changes).

At present, only KCC may change topology.
2010-08-28 23:38:59 +03:00
Kamen Mazdrashki
53551a76c5 s4-dreplsrv: Move partition cache update before scheduling another set of replications 2010-08-28 23:38:59 +03:00
Andrew Tridgell
cb0f8f0ee0 s4-repl: load RODC partitions using msDS-hasFullReplicaNCs
we mark these as incoming_only

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-25 23:05:05 +10:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Stefan Metzmacher
1caa8b06f7 s4:drepl_notify: hide some bugs from the make test output
It's useless to get messages like this every few seconds:

dreplsrv_notify: Failed to send DsReplicaSync to
edbf4745-2966-49a7-8653-99200f1c9430._msdcs.samba2003.example.com for
CN=Configuration,DC=samba2003,DC=example,DC=com -
NT_STATUS_OBJECT_NAME_NOT_FOUND : WERR_BADFILE

We have a non bug regarding non-linked DN attributes
and changes of the target DN.

metze
2010-07-09 16:43:17 +02:00
Stefan Metzmacher
538bb9b3ec s4:dsdb/repl: expose drsuapi_DsExtendedError to the caller (e.g. the ridalloc client)
metze
2010-07-09 09:27:16 +02:00
Stefan Metzmacher
49deed5a77 s4:drepl_out_helpers: don't return NT_STATUS_OK, if an extended operation doesn't return success
metze
2010-07-09 09:27:16 +02:00
Stefan Metzmacher
658a0f9ef8 s4:drepl_ridalloc: only ask the rid master for a new rid pool if we need to.
if we are at least half-exhausted then ask for a new pool.

This fixes a bug where we're sending unintialized alloc_pool
variable as exop->fsmo_info to the rid master and get back
DRSUAPI_EXOP_ERR_PARAM_ERROR.

metze
2010-07-09 09:27:15 +02:00
Andrew Tridgell
87df785a68 s4-dsdb: use ldb_operr() in the dsdb code
this replaces "return LDB_ERR_OPERATIONS_ERROR" with "return ldb_operr(ldb)"
in places in the dsdb code where we don't already explicitly set an
error string. This should make is much easier to track down dsdb
module bugs that result in an operations error.
2010-07-07 20:14:55 +10:00
Kamen Mazdrashki
163ed44903 s4/drs: DsReplicaSync should search partition to Sync
by any valid DSName attribute given, be it - partition DN,
partition GUID or partition SID
2010-06-25 04:51:59 +03:00
Andrew Bartlett
8d8678fcfd s4:dsdb Allow calling dsdb_convert_object_ex() directly
This will allow the libnet_vampire code to manually convert individual
schema objects.

Andrew Bartlett
2010-06-12 11:19:19 +10:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Matthieu Patou
f45cbb0a0d s4: Do not display by default the message Failed to send DsReplicaSync is other host is just unreachable
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-13 19:13:30 +02:00
Andrew Tridgell
7e2b3ab14f s4-repl: added a workaround for WERR_DS_DRA_NO_REPLICA DsReplicaSync errors
The 0xc0002104/WERR_DS_DRA_NO_REPLICA seems to be spurious, and can be
avoided by setting DRSUAPI_DRS_SYNC_ALL in the DsReplicaSync request.

We need to investigate this further, and find out from MS why this is
sometimes being sent, even when the target DC has the right repsFrom
entries
2010-04-27 15:24:40 +10:00
Andrew Tridgell
8aa30f9580 s4-repl: on a failed request, clear the current ptr
this prevents the queue being stuck on failure
2010-04-27 10:38:58 +10:00
Andrew Tridgell
9b18b339c0 s4-repl: end repl request when not doing an UpdateRefs
otherwise the queue is stuck forever
2010-04-27 10:38:58 +10:00
Andrew Tridgell
5fb60bc311 s4-repl: don't delete repsTo entry on DsReplicaSync
we rely on the highestUSN counters instead. W2K8 does not resend
DsUpdateRefs each time, and the WSPP docs do not indicate that repsTo
should be deleted
2010-04-27 10:38:58 +10:00
Andrew Tridgell
a31c711ba7 s4-drs: allow getncchanges requests to non WRIT_REP partitions for extended ops
Needed for RID allocation

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-26 19:06:07 +10:00
Andrew Tridgell
159de40b0b s4-drepl: don't send an UpdateRefs unless its a plain replication
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-26 19:06:06 +10:00
Andrew Tridgell
1f92df90fd s4-drs: removed dsdb_validate_client_flags()
This test is in the wrong place. We end up validating our own flags.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-22 19:36:16 +10:00
Fernando J V da Silva
59aa0a07d2 s40-drs: Do not send GetNCChanges messages to RODCs
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-22 19:36:15 +10:00
Fernando J V da Silva
57bcdf008f s4-drs: samdb_is_rodc() function and new samdb_rodc() function
This patch creates the samdb_is_rodc() function, which looks for
the NTDSDSA object for a DC that has a specific invocationId
and if msDS-isRODC is present on such object and it is TRUE, then
consider the DC as a RODC.
The new samdb_rodc() function uses the samdb_is_rodc() function
for the local server.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-22 19:36:15 +10:00
Matthias Dieter Wallnöfer
ad9e407357 Revert "s4:prefer "samdb_*_dn" basedn calls over the "ldb_get_*_dn" functions"
We should use the "ldb_get_*_basedn" calls since they are available in the LDB
library.
2010-04-13 08:55:15 +02:00
Fernando J V da Silva
8e1d947787 s4-drs: If we are a RODC then do not send DSReplicaSync messages 2010-03-25 15:02:19 +11:00
Andrew Bartlett
2de07761e0 s4:dsdb Change dsdb_get_schema() callers to use new talloc argument
This choses an appropriate talloc context to attach the schema too,
long enough lived to ensure it does not go away before the operation
compleates.

Andrew Bartlett
2010-03-16 19:26:03 +11:00
Stefan Metzmacher
77fb700e20 s4:dsdb/repl: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:41 +01:00
Kamen Mazdrashki
9f21787131 s4/drs: DsGetNCChanges - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11:57 +01:00
Matthias Dieter Wallnöfer
3ec4c643a4 s4:repl - change also here the counter variables to "unsigned"
I changed also some "uint32_t" to "unsigned" since the LDB interface doesn't
specify the bitlength of the unsigned type.
2010-03-05 18:28:35 +01:00
Stefan Metzmacher
0547af244a s4:drepl_out_helpers: don't look at the internals of 'struct rpc_request'
metze
2010-03-01 16:11:56 +01:00
Stefan Metzmacher
1955cde46c s4:drepl_notify: don't look at the internals of 'struct rpc_request'
metze
2010-03-01 16:11:56 +01:00
Stefan Metzmacher
c4e72add67 s4:dsdb/repl: make use of explicit dcerpc_*_recv functions
metze
2010-03-01 16:11:54 +01:00
Anatoliy Atanasov
b73437fbaa s4/rodc: Implement samdb_rodc with ldb context 2010-03-01 14:17:32 +02:00
Kamen Mazdrashki
99db858b15 s4/drs: Propagate drsuapi_DsReplicaSync changes in source base 2010-02-24 14:14:07 +02:00
Kamen Mazdrashki
8823a549ca s4/drs: propagate DRS_ extension flags in code base 2010-02-05 10:51:57 +01:00
Fernando J V da Silva
28420fe68a s4-drs: Reads uSNUrgent and sets Urgent Replication Bit for DS_ReplicaSync when necessary
If an urgent replication is necessary, so the uSNUrgent stored is equal to the
uSNHighest stored, then when sending the DS_ReplicaSync message it sets the
DRSUAPI_DRS_SYNC_URGENT bit on DRS_OPTIONS.

Signed-off-by: Fernando J V da Silva <fernandojvsilva@yahoo.com.br>
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-01-28 17:21:41 +11:00
Andrew Tridgell
8342d08f5c s4-dsdb: take advantage of local cursor and sort
in getncchanges and repl task we don't need the extra load and sort
any more.
2010-01-16 14:10:43 +11:00
Andrew Tridgell
09d947f77c s4-dsdb: use dsdb_load_udv_v2() in repl task 2010-01-16 14:10:43 +11:00
Andrew Tridgell
88ec10b757 s4-drepl: switch drepl over to using the generic DRS options flags
WSPP uses a single set of flags for all these DRS operations.
2010-01-14 15:37:59 +11:00
Fernando J V da Silva
6f806b7079 s4-drs: Uses dsdb_load_partition_usn() with urgent_uSN in s4 code
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-01-14 15:37:59 +11:00
Fernando J V da Silva
e30d009965 s4-drs: Store uSNUrgent for Urgent Replication
When a object or attribute is created/updated/deleted, according
to [MS-ADTS] 3.1.1.5.1.6, it stores the uSNUrgent on @REPLCHANGED
for the partitions that it belongs.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-01-14 15:37:58 +11:00
Stefan Metzmacher
92b87eb474 s4:dsdb/repl: reorder dreplsrv_op_notify* functions
This make the whole async dreplsrv_op_notify_send/recv()
readable.

metze
2010-01-13 16:00:20 +01:00
Stefan Metzmacher
e886b6e240 s4:dsdb/repl: change dreplsrv_op_notify_send/recv() to tevent_req
metze
2010-01-13 14:52:00 +01:00
Andrew Tridgell
45f49d0a58 s4-drs: add a local UDV entry even when no replUpToDateVector present on NC
This allows us to filter correctly for a NC that we have created but
not pulled from anyone.
2010-01-09 21:59:33 +11:00
Andrew Tridgell
b37bec8e06 s4-drs: give DN of failed replication partition 2010-01-09 21:59:32 +11:00
Andrew Tridgell
7010fad4ea s4-drs: calculate and send a uptodateness_vector with replication requests
This stops us getting objects changes twice if they came via an
indirect path.
2010-01-09 18:56:29 +11:00
Stefan Metzmacher
501dd4a3b5 s4:dsdb/repl: convert dreplsrv_op_pull_source_send/recv to tevent_req
metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-01-08 13:03:05 +11:00
Andrew Tridgell
2590b7795d s4-repl: implement MSG_DREPL_ALLOCATE_RID
When the repl server gets MSG_DREPL_ALLOCATE_RID it contacts the RID
Manager to ask for another RID pool. We use a callback on completion
of the operation to make sure that we don't have two RID allocation
requests in flight at once

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:01 +11:00
Andrew Tridgell
cc7967b1c0 s4-repl: allow for callbacks when a repl operation completes
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:01 +11:00
Andrew Tridgell
19e515aac7 s4-repl: added request for RID allocation in drepl task
The drepl task now checks to see if our rIDAllocationPool is
exhausted, and if it is then we queue a extended operation
DsGetNCChanges call to ask the RID Manager to give us a new allocation
pool.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:00 +11:00
Stefan Metzmacher
f04e10f4c0 s4:dsdb/repl: convert dreplsrv_out_drsuapi_send/recv to tevent_req
metze
2010-01-04 09:36:25 +01:00