1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

119 Commits

Author SHA1 Message Date
Andrew Tridgell
baf93360a8 s4-drs: include deleted objects in getncchanges reply
Even though we don't create deleted objects ourselves yet, we need to
pass along deleted objects we receive from other replication partners
2009-09-24 10:35:40 -07:00
Anatoliy Atanasov
4f9de0e995 s4: Handle DRSUAPI_DS_REPLICA_NEIGHBOUR_SPECIAL_SECRET_PROCESSING in getncchanges
When this flag is specified in the request these attributes are treated as
secret: currentValue, dBCSPwd, initialAuthIncoming, initialAuthOutgoing,
lmPwdHistory, ntPwdHistory, priorValue, supplementalCredentials,
trustAuthIncoming, trustAuthOutgoing, unicodePwd
Their value is changed to NULL and the meta_data.originating_change_time to 0
2009-09-23 17:10:27 -07:00
Anatoliy Atanasov
23e4470c31 s4: Handle DRSUAPI_DS_REPLICA_NEIGHBOUR_ASYNC_REP in getncchanges
When this flag is specified in the request we should return
for ncRoot only and so scope of search is LDB_SCOPE_BASE.
2009-09-23 17:10:21 -07:00
Anatoliy Atanasov
97a9ae15b5 s4: Handle DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_SYNC_PACKET in getncchanges
When this flag is specified in the request we shouldn't use the
uptodateness vector in the request.
2009-09-23 17:10:12 -07:00
Anatoliy Atanasov
c9dc6506e6 s4: Handle DRSUAPI_DS_REPLICA_NEIGHBOUR_CRITICAL_ONLY req in getncchanges 2009-09-23 15:50:51 -07:00
Andrew Tridgell
10f86114de s4-drs: fill in more guids and SIDs, plus filter rDN
In DsGetNCChanges we need to fill in the parentGUID and objectGUID of
each object, plus we need to filter out the rDN from the meta data,
and always send the instanceType
2009-09-23 14:01:30 -07:00
Andrew Tridgell
af4c1f7fc6 s4-drsserver: fixed addition of sort control 2009-09-23 14:01:29 -07:00
Andrew Tridgell
ee4f7f1209 s4-drsserver: sort by DN to give tree order
This might help the windows client with ordered requests. Later we
need to support the "ancestors" mode flag.
2009-09-22 17:10:06 -07:00
Andrew Tridgell
bb3bdb3a62 s4-ldb: added a bunch more debug for DC join
These additional debug messages were added to help us track down
w2k8->s4 domain join
2009-09-22 17:10:06 -07:00
Andrew Tridgell
d5b9409e63 s4-drs: security checking on DRS needs to default to on 2009-09-19 19:39:42 -07:00
Andrew Tridgell
ad53c34b6b s4-repl: need param.h for lp_parm_bool 2009-09-19 15:53:22 -07:00
Anatoliy Atanasov
0b68967096 Move replmd_drsuapi_DsReplicaCursor2_compare to a common place. 2009-09-19 15:42:00 -07:00
Anatoliy Atanasov
6e56261eb7 Add drs_security_level_check for dcesrv calls security checks
There is also an option to disable the security check
by specifying in the smb.conf file:
drs:disable_sec_check = true
2009-09-19 15:39:40 -07:00
Andrew Tridgell
1261d694f0 more include minimisation 2009-09-19 14:12:01 -07:00
Andrew Tridgell
86383f0003 s4-rpc_server: removed remaining unnecessary #includes 2009-09-19 14:11:34 -07:00
Andrew Tridgell
8ea2cb2403 idl: added DsExecuteKCC IDL 2009-09-17 00:05:22 -07:00
Andrew Tridgell
30d13288e5 s4-repl: take advantage of async RPC forwarding
This uses async RPC forwarding for the DsReplicaSync call
2009-09-15 20:51:10 -07:00
Andrew Tridgell
5d2dfd12cf s4-drs: lock down key DRS calls
The key DRS calls should only be allowed by administrators or domain
controllers
2009-09-15 19:52:25 -07:00
Andrew Tridgell
9e0b1a3a1f s4-drs: filter based on local_usn
The getncchanges uSN is in our local space, so we must compare it to
the local_usn in replPropertyMetaData
2009-09-15 18:45:42 -07:00
Andrew Tridgell
b9ce122ff2 s4-drs: allow replication of renames
a rename may have no attribute changes
2009-09-14 13:12:32 -07:00
Andrew Tridgell
348efd5cbb s4-drs: fixed search expression
At least on the command line the braces are needed. Strange.
2009-09-13 16:40:00 -07:00
Andrew Tridgell
1820f4bdaf s4-drs: change debug level
It's useful seeing the object count without as much detail
2009-09-12 15:23:30 +10:00
Andrew Tridgell
a8ab1e2570 s4-drs: also fill in tmp_highest_usn
Without this the client will not update its repsFrom highest_usn values
2009-09-12 13:06:32 +10:00
Andrew Tridgell
493166b009 s4-drs: return objects with uSN > highest_usn
When the client tells us the highest_usn they have is N, then we want
to send them objects with usn>N, not>=N, as otherwise we end up
sending them the same object (the one with the highest uSN) again and
again.
2009-09-12 12:42:40 +10:00
Andrew Tridgell
0819e79c4f s4-drs: spelling fix, and simpler search expression
uSNChanged>=N is good enough, and offers a possibility of a simple
optimisation where the partition module could look for that expression
and check the partitions sequence number, then avoid searching a
partition that doesn't have any records with a larger uSN.
2009-09-12 12:08:34 +10:00
Andrew Tridgell
bbc0a56da5 s4-drs: fixed the cursor generation to always be filled in
We were relying on the uSNChanged>=n search always finding the DN of
the root of the partition, but this now doesn't happen very often as
we are now restricting when we change uSNChanged. This means we need
to always load the replUpToDateVector attribute from the NC root and
use it to populate the cursors in the return.
2009-09-12 11:15:28 +10:00
Andrew Tridgell
5da0a7e1a1 s4-repl: use common functions to simplify updaterefs.c
We now have dsdb_loadreps() and dsdb_savereps()
2009-09-12 11:15:27 +10:00
Anatoliy Atanasov
9014cb64fd Fix up-to-dateness vector creation. 2009-09-12 11:15:26 +10:00
Andrew Tridgell
97182d52df s4-drs: fixed the ldap SPN in AddEntry 2009-09-11 23:14:07 +10:00
Andrew Tridgell
d7d7613e31 s4-idl: added the IDL for the DsReplica* calls 2009-09-11 22:13:45 +10:00
Andrew Tridgell
8c58cef875 s4-drs: actually call the new drsuapi_add_SPNs() code
An early return here didn't do any good :-)
2009-09-11 17:13:28 +10:00
Andrew Tridgell
88e2fbaf95 s4-drs: add the magic DRS SPNs on AddEntry
When a DsAddEntry is used to create a nTDSDSA object we need to also
create the SPNs for the NTDS GUID in the servers machine account.
2009-09-11 15:15:39 +10:00
Andrew Tridgell
fdb8758e69 s4/drs: parentGUID needs to be specififcally asked for
Right now parentGUID is a normal attribute in s4, but it should be
generated, which means we need to ask for it in a search if we want to
use it.
2009-09-11 14:07:19 +10:00
Andrew Tridgell
3e7a3bc9bd s4/drs: enable attribute encryption
This means we now get passwords vampired correctly for s4<->s4
replication.
2009-09-10 17:46:30 +10:00
Andrew Tridgell
a08d17342d s4/drs: changed the UpdateRefs server to use the dn instead of the GUID
Our vampire code sends a zero GUID in the updaterefs calls. Windows
seems to ignore the GUID and use the DN in the naming context instead,
so I have changed our UpdateRefs server implementation to do the same.

With this change we can now vampire from s4<->s4 successfully! Now to
see if all the attributes came across correctly.
2009-09-10 14:28:24 +10:00
Andrew Tridgell
0c03232259 s4/drs: correctly fill in the GUID of DRS objects 2009-09-10 13:51:08 +10:00
Andrew Tridgell
78a5a5e665 s4: fix spelling 2009-09-10 13:50:46 +10:00
Andrew Tridgell
b65d6cf013 s4/drs: when we don't find an attribute use zero values
thanks to metze for pointing this out
2009-09-10 01:27:12 +10:00
Andrew Tridgell
a84a82335c s4:drs match the meta_data and attributes array
These two arrays need to be in sync, as they are walked in sync by the
client
2009-09-09 23:38:51 +10:00
Andrew Tridgell
e595ba2105 s4/drs: broke out the core of the getncchanges code
It is easier to understand without the heavy nesting
2009-09-09 21:26:17 +10:00
Andrew Tridgell
9721b1b7c0 s4:drs level_out is a pointer
DsAddEntry now seems to work for simple tests
2009-09-09 21:06:36 +10:00
Andrew Tridgell
51baffab5f s4:drs split addentry and getncchanges into separate files
These will get quite complex eventually, I think we are better
separating them so the code is a bit easier to follow
2009-09-09 21:06:36 +10:00
Andrew Tridgell
8640293fab s4/repl: implement DsReplicaSync
This patch implements DsReplicaSync by passing the call via irpc to
the repl server task. The repl server then triggers an immediate
replication of the specified partition.

This means we no longer need to set a small value for
dreplsrv:periodic_interval to force frequent DRS replication. We can
now wait for the DC to send us a ReplicaSync msg for any partition
that changes, and we immediately sync that partition.
2009-09-09 18:04:07 +10:00
Andrew Tridgell
dca7afb799 s4: fixed format of repsTo in samdb
Metze pointed out what the windows tool ldp.exe will examine repsTo
attributes on remote DCs, so we do in fact need to use the same format
that windows uses. This patch changes the server side implementation
of UpdateRefs to use the windows format
2009-09-09 12:36:51 +10:00
Stefan Metzmacher
d04cca005c s3:drsuapi: add a simple DsRemoveDSServer() implementation
metze
2009-09-08 22:06:02 +02:00
Stefan Metzmacher
5ef601e5eb s4:drsuapi: add an incomplete DsAddEntry implementation
metze
2009-09-08 22:05:56 +02:00
Andrew Tridgell
91805627c9 s4: implemented server side of DSUpdateRefs call
This call is made by DCs to tell us we should notify them of directory
changes
2009-09-08 11:52:45 +10:00
Anatoliy Atanasov
e6816715b7 Fill the meta data vector in the responce struct. 2009-09-08 11:52:44 +10:00
Anatoliy Atanasov
38995d7cbb First attempt to implement dcesrv_drsuapi_DsGetNCChanges
So far it returns the ctr6 responce without proper linked attributes
support and metadata. A couple of improvements are the filter in the search
uses '(uSNChanged>=N)', added extended dn search support, non-replicated attributes
are excluded from the result.
2009-09-03 19:10:49 +10:00
Jelmer Vernooij
87ec1d2532 Make sure prototypes are always included, make some functions static and
remove some unused functions.
2008-10-20 18:59:51 +02:00