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

79 Commits

Author SHA1 Message Date
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
Andrew Bartlett
400a56d6dd r20315: Implement the server side of DsGetDomainControllerInfo. This is a
supprisingly complex call...

It turns out that the in/out parameter 'level' is not in/out, but set
seperatly by the server-side code from r->req.req1.level.

This commit also breaks out some common code from samldb into samdb.

Andrew Bartlett
(This used to be commit 2eb9e6445c)
2007-10-10 14:29:38 -05:00
Stefan Metzmacher
9671a72a4c r19847: add idl for DsRemoveDSServer(), this is used when a server unbecomes a DC
metze
(This used to be commit df133cd22a)
2007-10-10 14:28:25 -05:00
Simo Sorce
a9e31b33b5 r19832: better prototypes for the linearization functions:
- ldb_dn_get_linearized
  returns a const string

- ldb_dn_alloc_linearized
  allocs astring with the linearized dn
(This used to be commit 3929c086d5)
2007-10-10 14:28:22 -05:00
Simo Sorce
4889eb9f7a r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
(This used to be commit a580c871d3)
2007-10-10 14:28:22 -05:00
Andrew Bartlett
08452bd738 r19761: This may need work, but here is an initial implementation of
DsWriteAccountSpn().

It passes the client toture test.

Andrew Bartlett
(This used to be commit a1e80eeb95)
2007-10-10 14:28:20 -05:00
Günther Deschner
eda5759e45 r16796: Fill in dsr_GetMemberships() / dsr_GetMemberships2().
This intersting call is apparently used to construct the user token,
collect memberships from other DSAs and to retrieve (nested) memberships
of a given group.

Torture test to follow (once I cleaned it up).

Guenther
(This used to be commit ca5e133e8c)
2007-10-10 14:09:46 -05:00
Stefan Metzmacher
657325d684 r15319: remove unneeded macros
metze
(This used to be commit 9611c8aa9c)
2007-10-10 14:05:14 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Andrew Bartlett
db4b95827e r11270: Move the core CrackNames code from rpc_server/drsuapi to dsdb/samdb.
I'm sure this will not be the final resting place, but it will do for
now.

Use the cracknames code in auth/ for creating a server_info given a
principal name only (should avoid assumtions about spliting a
user@realm principal).

Andrew Bartlett
(This used to be commit c9d5d8e45d)
2007-10-10 13:45:11 -05:00
Andrew Bartlett
16bbafb7e8 r11239: Use ${REALM} for the realm in rootdse.ldif
Add the kpasswd server to our KDC, implementing the 'original' and
Microsoft versions of the protocol.

This works with the Heimdal kpasswd client, but not with MIT, I think
due to ordering issues.  It may not be worth the pain to have this
code go via GENSEC, as it is very, very tied to krb5.

This gets us one step closer to joins from Apple, Samba3 and other
similar implementations.

Andrew Bartlett
(This used to be commit ab5dbbe10a)
2007-10-10 13:45:06 -05:00
Andrew Bartlett
b4b75ddb5a r11223: Only pass around the ldb handle (make this code easier to seperate
into a general lib).

Andrew Bartlett
(This used to be commit e3abbfca4a)
2007-10-10 13:45:05 -05:00
Andrew Bartlett
ddb1c4aa13 r11194: Use the special ldb attribute "canonicalName" (therefore testing that
codepath) in DRSUAPI CrackNames.

Fix the NT4 account return value.

Andrew Bartlett
(This used to be commit 2513c02c64)
2007-10-10 13:44:59 -05:00
Andrew Bartlett
d96f706bb0 r10953: Add a new function to form a canonicalName out of a DN to ldb_dn.c
Use this new function in the client and server for the CrackNames
case, where we particularly need it.

Andrew Bartlett
(This used to be commit 380037ee09)
2007-10-10 13:39:45 -05:00
Andrew Tridgell
36d73b0e71 r10894: make the handling of dn/distinguishedName much closer to real
ldap. Also ensure we put a objectclass on our private ldb's, so they
have some chance of being stored in ldap if you want to
(This used to be commit 1af2cc067f)
2007-10-10 13:39:40 -05:00
Andrew Bartlett
dddaa5204e r10811: Revert accidental commit, I still need to finish the displayName and
syntatical mapping work.

Andrew Bartlett
(This used to be commit 7ec5084f63)
2007-10-10 13:39:32 -05:00
Andrew Bartlett
1377cca5f4 r10810: This adds the hooks required to communicate the current user from the
authenticated session down into LDB.  This associates a session info
structure with the open LDB, allowing a future ldb_ntacl module to
allow/deny operations on that basis.

Along the way, I cleaned up a few things, and added new helper functions
to assist.  In particular the LSA pipe uses simpler queries for some of
the setup.

In ldap_server, I have removed the 'ldasrv:hacked' module, which hasn't
been worked on (other than making it continue to compile) since January,
and I think the features of this module are being put into ldb anyway.

I have also changed the partitions in ldap_server to be initialised
after the connection, with the private pointer used to associate the ldb
with the incoming session.

Andrew Bartlett
(This used to be commit fd7203789a)
2007-10-10 13:39:32 -05:00