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

96 Commits

Author SHA1 Message Date
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
Günther Deschner
6ddaf5f160 s4-drsuapi: merge drsuapi_DsCrackNames from s3 drsuapi idl.
Guenther
2008-10-18 23:06:31 +02:00
Günther Deschner
ca84c406d3 s4-drsuapi: merge drsuapi_DsGetDomainControllerInfo from s3 drsuapi idl.
Guenther
2008-10-18 23:06:24 +02:00
Günther Deschner
32a1d55797 s4-drsuapi: merge drsuapi_DsWriteAccountSpn from s3 drsuapi idl.
Guenther
2008-10-18 23:06:17 +02:00
Simo Sorce
508527890a Merge ldb_search() and ldb_search_exp_fmt() into a simgle function.
The previous ldb_search() interface made it way too easy to leak results,
and being able to use a printf-like expression turns to be really useful.
2008-09-23 18:17:46 -04:00
Michael Adam
7fba6c649b Change occurrences of the u1 member of DsBindInfo* to pid after idl change.
Michael
(This used to be commit b91bbc5fe4)
2008-07-22 15:35:23 +02:00
Jelmer Vernooij
21fc767378 Specify event_context to ldb_wrap_connect explicitly.
(This used to be commit b4e1ae07a2)
2008-04-17 12:23:44 +02:00
Jelmer Vernooij
0500b87092 r26540: Revert my previous commit after concerns raised by Andrew.
(This used to be commit 6ac86f8be7)
2007-12-21 05:52:06 +01:00
Jelmer Vernooij
3e75f222bc r26539: Remove unnecessary statics.
(This used to be commit e53e79eebe)
2007-12-21 05:52:05 +01:00
Jelmer Vernooij
57f20ccd24 r26296: Store loadparm context in DCE/RPC server context.
(This used to be commit fc1f4d2d65)
2007-12-21 05:48:13 +01:00
Jelmer Vernooij
f4a1083cf9 r26227: Make loadparm_context part of a server task, move loadparm_contexts further up the call stack.
(This used to be commit 0721a07aad)
2007-12-21 05:47:04 +01:00
Andrew Bartlett
25143a2648 r26135: Remove samdb_add(), samdb_delete() and samdb_modify(), which were just
wrappers to ldb_add() etc.  samdb_replace() remains, as it sets flags on
all entries as 'replace'.

Andrew Bartlett
(This used to be commit 09c0faa5b7)
2007-12-21 05:46:17 +01:00
Andrew Bartlett
3f2ca10d2d r25940: Rework the samldb and templates handling.
Templates just don't belong in the sam.ldb, as they don't obey any of
the other rules.  This moves them to a seperate templates.ldb.

In samldb, this patch reworks the duplicate SID and Name detection
code, to use ldb_search_exp_fmt() rather than gendb_search.  This
returns far more useful errors, which we now handle and report better.

The call to samdb_search_for_parent_domain() has been moved in samldb,
to allow both the account and SID uniqueness checks to be in the same
domain.  This function also returns better errors.

dcesrv_drsuapi.c is updated for the new prototype of
samdb_search_for_parent_domain()

Andrew Bartlett
(This used to be commit f1ab90c88c)
2007-12-21 05:45:10 +01:00
Jelmer Vernooij
05e7c48146 r25553: Convert to standard bool type.
(This used to be commit b7371f1a19)
2007-10-10 15:07:54 -05:00
Andrew Bartlett
58d9f6ed9d r24246: Avoid the annoying 'probable memory leak in ldb' messages, by fixing
some issues in the NBT server (this was a false positive, but easily
worked around) and DRSUAPI server.

We should take care not to use the ldb_context as a talloc pool, and
to always ensure that any results from ldb_search() are moved off that
pool with talloc_steal or talloc_free().

To work around the issue in provision, for which I can find no fault
(other than a lot of work being done in provision), I've moved the
detector trigger to 400 additional blocks.

This fixes Bug #4810 by <mwallnoefer@yahoo.de>

Andrew Bartlett
(This used to be commit 42bcf85620)
2007-10-10 15:01:29 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Günther Deschner
4d1a21f24d r23239: Fill in drsuapi_QuerySitesByCost.
Guenther
(This used to be commit cf953d0481)
2007-10-10 14:53:06 -05:00
Andrew Bartlett
a62b46b4b2 r22477: When an invaild base is specified to ldb_search, it should return
LDB_ERR_NO_SUCH_OBJECT.  Handle this (found against LDAP, ldb_tdb is
being updated).

Andrew Bartlett
(This used to be commit 93e2ff2e85)
2007-10-10 14:51:31 -05:00
Stefan Metzmacher
89e28a0ec8 r21512: finish DsBind() in the DRSUAPI server:
- fill in our on bind_info struct correctly
- remember the local and remote DsBindInfo28 struct
- remember the remote bind_buid

w2k3 now tries replicate using DsGetNCChanges() from us,
after the NET-API-BECOME-DC test created the domain controller
and replicated all data.

(But we still give a DCERPC fault in DsGetNCChanges()...)

metze
(This used to be commit 33550c063d)
2007-10-10 14:48:47 -05:00
Stefan Metzmacher
ced4976d94 r21356: we have a function to get the sites dn
also it's not always under the domain dn

metze
(This used to be commit b8c940f1e2)
2007-10-10 14:48:18 -05:00
Jelmer Vernooij
64e88a8ccf r20850: Prefix all server calls with dcesrv_
(This used to be commit 76c78b0339)
2007-10-10 14:43:39 -05:00
Stefan Metzmacher
57f5bf78fa r20514: implement idl for DsGetNT4ChangeLog() which transferres the meta data
for NT4 DC's in mixed mode domains.

This call is triggered by tranferring the PDC FSMO Role to another DC

the real meta data is encoded in the user buffer which is just a DATA_BLOB in idl

metze
(This used to be commit d883815c8d)
2007-10-10 14:36:04 -05:00
Andrew Bartlett
f4fd6d97e6 r20374: It's still 2006 (just...). Add copyright.
Andrew Bartlett
(This used to be commit 21b38ae1e4)
2007-10-10 14:30:18 -05:00
Andrew Bartlett
ea4c64388b r20353: Restructure the DRSUAPI DsGetDomainControllerInfo test, because as
usual things are more complex than they appear.

Also remove the incorrect server-side implementation, which blindly
assumed some sense of consistancy across the API switch levels.

Andrew Bartlett
(This used to be commit 79941adbff)
2007-10-10 14:30:15 -05:00