1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

174 Commits

Author SHA1 Message Date
Andrew Tridgell
8dc92c8f71 ldb: use #include <ldb.h> for ldb
thi ensures we are using the header corresponding to the version of
ldb we're linking against. Otherwise we could use the system ldb for
link and the in-tree one for include

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:07 +01:00
Andrew Tridgell
bf52cffd25 s4-kcc: fixed valgrind errors in drs replicaInfo server side
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Nov 26 03:52:30 CET 2010 on sn-devel-104
2010-11-26 03:52:30 +01:00
Andrew Tridgell
5d014cad08 s4-kcc: disable the NDR printing of DRS getinfo requests 2010-11-24 00:19:15 +01:00
Andrew Tridgell
5b3981acb1 s4-rodc: enable the DRS_GET_ALL_GROUP_MEMBERSHIP flag for RODC replication
see the description of this flag in [MS-DRSR]
2010-11-18 23:12:26 +01:00
Andrew Tridgell
e17ea9f3f5 s4-kcc: fixed result_last_attempt in showrepl 2010-11-17 23:55:39 +11:00
Andrew Tridgell
ac0a92b5b3 s4-debug: lowered the debug level of some unimportant messages 2010-11-08 06:16:04 +00:00
Stefan Metzmacher
e3276b3ab3 s4:dsdb/kcc: fix memory leak in kcctpl_copy_output_edges()
metze
2010-11-04 17:13:01 +01:00
Kai Blin
e7358e7582 s4 dsdb kcc: Prefer msDS-hasMasterNCs over hasMasterNCs when replicating 2010-10-23 10:17:05 +00:00
Matthias Dieter Wallnöfer
a0e9814c0d s4:dsdb - remove "samdb_result_uint", "samdb_result_int64", "samdb_result_uint64" and "samdb_result_string"
We have ldb_msg_find_attr_as_* calls which do exactly the same. Therefore this
reduces only code redundancies.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-10-15 08:36:01 +11:00
Jelmer Vernooij
93126b3315 samdb: Add flags argument to samdb_connect(). 2010-10-10 23:08:49 +02:00
Matthias Dieter Wallnöfer
e3081b92c1 s4:dsdb - substitute the "show_deleted" with the "show_recycled" control
We intend to see always all objects with the "show_deleted" control specified.
To see also recycled objects (beginning with 2008_R2 function level) we need to
use the new "show_recycled" control.

As far as I see this is only internal code and therefore we don't run into
problems if we do substitute it.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-10-03 15:23:18 +00:00
Andrew Tridgell
32ec1b36e0 s4-kcc: silence "Testing kcctpl_create_intersite_connections" message
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sun Oct  3 04:51:44 UTC 2010 on sn-devel-104
2010-10-03 04:51:44 +00:00
Andrew Tridgell
6e846ca1f3 s4-kcc: remove stale repsTo entries in the KCC
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-02 01:04:17 +00:00
Andrew Tridgell
4d551753d6 s4-kcc: fixed the replica_flags in repsFrom in the kcc
if our calculated replica_flags doesn't match the ones in our repsFrom
then update it

Pair-Programmed-With: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2010-09-29 22:12:57 -07:00
Andrew Tridgell
17aa2b3294 s4-kcc: fixed a incorrect context to kcctpl_get_all_bridgehead_dcs 2010-09-27 22:55:04 -07:00
Andrew Tridgell
396cdd6343 s4-kcc: don't print "Testing kcctpl_create_intersite_connections"
log level 0 is excessive for this!
2010-09-27 23:18:23 +00:00
Anatoliy Atanasov
67b6252eed s4/dsdb:kcc: cleanup and improve readability 2010-09-23 08:41:05 -07:00
Stefan Metzmacher
519180c341 s4:dsdb/kcc: we don't need to manually allocate [out,ref] pointers anymore
metze

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2010-09-23 08:41:05 -07:00
Andrew Tridgell
d2008fbbb9 s4-kcc: the kcc should not be setting the repsTo attribute
repsTo is set by other DCs, when they ask to be notified about changes
in a partition
2010-09-23 07:17:57 +00:00
Andrew Tridgell
d1cbd68bb1 s4-kcc: added service->am_rodc
use a rodc flag on the service instead of calling samdb_rodc each time
2010-09-23 07:17:57 +00:00
Andrew Tridgell
c166b44b47 s4-kcc: pass the service context into the kcc connection code
this will be used for the RODC changes needed for the kcc
2010-09-23 07:17:56 +00:00
Andrew Tridgell
59951163be s4-kcc: a bit more debug info on repsFrom creation
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-20 15:27:45 -07:00
Andrew Tridgell
b9393e4896 s4-kcc: removed redundent loop check
el has already been checked for NULL
2010-09-15 15:39:34 +10:00
Kamen Mazdrashki
4f5dd3f93b s4-dreplsrv: Do allocations on long-living context so that callback gets called 2010-09-09 18:26:51 +03:00
Stefan Metzmacher
ff0362fc35 s4:dsdb/kcc: use irpc_binding_handle_by_name()
metze
2010-09-03 17:00:19 +02:00
Kamen Mazdrashki
b5ed9c2c4d s4-kcc: Notify dreplsrv that Topology has changed 2010-08-28 23:38:59 +03:00
Kamen Mazdrashki
a052497c74 s4-kcc: Assert when unexpected repsFromToBlob version is passed
At present we only support v1 structures (Win2k3 and earlier),
so it is good to make it obvious.
In case we start supporting v2 we will be able to notice this
function should be refactored right away
2010-08-28 23:38:58 +03:00
Matthias Dieter Wallnöfer
390bfed7b7 s4:kcc_connection.c - fix typo in error message 2010-08-07 14:22:42 +02: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
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Matthias Dieter Wallnöfer
8219c4f69c s4:kcc_periodic.c - fix counter types
We are counting LDB objects here -> therefore "unsigned"
2010-04-27 08:19:10 +02:00
Andrew Tridgell
b0aa476948 s4-drs: add entries to repsTo based on calculated repsFrom
This is based on the documentation: "the KCC will automatically create
the Reps-To attributes on destination DSAs based on other DSAs
Reps-From entries."
2010-04-27 10:38:59 +10:00
Andrew Tridgell
3119296e42 s4-drepl: don't setup a repsFrom from a DC that isn't a master for a NC
use hasMasterNCs to see what NCs we should be pulling from each DC
2010-04-27 10:38:59 +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
Jelmer Vernooij
7da94cc4a6 subunit: Support formatting compatible with upstream subunit, for consistency.
Upstream subunit makes a ":" after commands optional, so I've fixed any
places where we might trigger commands accidently. I've filed a bug
about this in subunit.
2010-04-11 20:57:33 +02: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
Matthias Dieter Wallnöfer
559575fe40 s4:dsdb/kcc/*.c - fix up wrong typed counters 2010-03-16 08:49:22 +01:00
Erick Nogueira do Nascimento
81932f9148 s4-drs: DsGetReplInfo(), infoType = DS_REPL_INFO_METADATA_2_FOR_OBJ
Implementation of the DS_REPL_INFO_METADATA_2_FOR_OBJ infoType for DsGetReplInfo()

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-03-16 13:31:08 +11:00
Crístian Deives
a0527dd790 use unsigned instead of uint32_t for LDB counters.
the attribute num_values of the struct ldb_message_element is defined as
an unsigned int, so the counters of that variable should be of the same
type.
2010-03-12 16:31:20 +11:00
Crístian Deives
208e2801b4 nTDSConnection creation
create nTDSConnection objects to "imply" the minimum-cost spanning tree edges
for which no nTDSConnection objects yet exist. it also adds a test function in
kcc_connection so the kcctpl functions can be called. this patch is in accord
with the sections [MS-ADTS] 7.2.2.3.4.2 and 7.2.2.3.4.5.
2010-03-12 16:31:20 +11:00
Crístian Deives
6e20906f42 spanning tree computation
calculate the spanning tree for the intersite connection. this patch is in
accord with the section [MS-ADTS] 7.2.2.3.4.4.
2010-03-12 16:31:20 +11:00
Crístian Deives
b70df94f62 new function kcctpl_color_vertices
besides the new function implemented, some minor bugs were also fixed.  this
patch is in accord with the section [MS-ADTS] 7.2.2.3.4.3.
2010-03-12 16:31:20 +11:00
Matthias Dieter Wallnöfer
6f11818923 s4:kcc - Change some counter variables to be unsigned
The upper limits are unsigned variables therefore also the counter variables
need to be like that.
2010-03-05 13:38:01 +01:00
Kamen Mazdrashki
30ac3caade s4/drs: Propagate drsuapi_DsReplicaGetInfoRequest... changes into source code 2010-02-24 14:14:08 +02:00
Anatoliy Atanasov
0e8fe821c9 s4/drs:kccdrs_replica_get_info_obj_metadata implementation
Fix the names of the drsuapi_DsReplicaInfoType enum and rebuild the .idl
The get_info_obj_metadata implementation is ported from implementation
i developed and tested at the samba io lab 2009
2010-02-17 18:03:31 +02:00
Andrew Tridgell
eda16f2410 s4-kcc: remove a qsort() that snuck into the new topology code 2010-02-16 22:42:59 +11:00
Andrew Tridgell
6d65f4c647 s4-kcc: remove search_onelevel_with_deleted() in kcc
Use dsdb_search() instead

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-16 21:10:51 +11:00
Andrew Tridgell
b630530730 s4-dsdb: added dsdb_search_one() and cleanup dsdb_find_dn_by_guid()
dsdb_find_dn_by_guid() now takes a struct GUID instead of a
guid_string. All the callers in fact wanted a struct GUID, so we now
avoid the extra conversion.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-16 21:10:51 +11:00
Erick Nogueira do Nascimento
23d1dd5189 s4-drs: DsGetReplInfo() refactoring 2010-02-16 08:34:28 +11:00
Erick Nogueira do Nascimento
3e2a8676c3 s4-drs: DsReplGetInfo() for DS_REPL_INFO_REPSTO infoType
Implements the DS_REPL_INFO_REPSTO infoType of DsReplGetInfo().
2010-02-16 08:34:28 +11:00
Andrew Tridgell
aba73767c0 s4-kcc: remove C++ comment 2010-02-15 23:22:48 +11:00
Crístian Deives
0cf4e8aae6 s4-kcc: initial code for the topology algorithm
this patch contains the data structures declarations and the functions to
setup the graph.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-15 23:22:48 +11:00
Andrew Tridgell
f461a72ec3 idl: switched to using the WSPP names for the 'neighbour' DRS options
The documentation shows that all these functions in fact use the same
flags variable type. To be consistent between functions, and to allow
easy reference to the WSPP docs, it is better for us to also use this
generic DrsOptions bitfield rather than one per operations.
2010-01-18 07:25:18 +11:00
Andrew Tridgell
ee736083c0 s4-kcc: added DsReplicaGetInfo pending ops call
Just return 0 pending ops for now
2010-01-16 14:10:45 +11:00
Andrew Tridgell
473345f800 s4-kcc: added DsReplicaGetInfo CURSORS2 level 2010-01-16 14:10:44 +11:00
Andrew Tridgell
93531a52f0 s4-idl: in DsReplicaGetInfo unknown2 is actually an enumeration_context 2010-01-16 14:10:44 +11:00
Andrew Tridgell
c22973d88d s4-kcc: added support for CURSORS info level in DsReplicaGetInfo 2010-01-16 14:10:44 +11:00
Andrew Tridgell
3ff3612e29 s4-kcc: simplify the ReplicaGetInfo implementation a bit 2010-01-16 14:10:43 +11:00
Andrew Tridgell
900fea322c s4-kcc: squash a warning 2010-01-16 14:10:42 +11:00
Andrew Tridgell
5bfeed89da s4-drs: framework for DsGetReplInfo(), includes the DS_REPL_INFO_NEIGHBORS infoType.
This patch includes the framework for the implementation of all infoTypes of
the DsGetReplInfo() call, and includes the implementation for the first one,
the DS_REPL_INFO_NEIGHBORS.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-01-16 14:10:42 +11:00
Andrew Tridgell
cced567364 s4-kcc: added a preiodic task to remove deleted objects
we check for deleted objects in each partition every 10 minutes, using
onelevel searches
2010-01-02 08:16:56 +11:00
Andrew Tridgell
9819d280d6 s4-dsdb: added dsdb_tombstone_lifetime() 2010-01-02 08:16:56 +11:00
Andrew Tridgell
92d75a4bfb s4-kcc: don't crash with a NULL ntds connection list 2009-12-21 23:41:09 +11:00
Crístian Deives
1cf48022af s4-drs: add deletion of old connections
the nTDSConnection objects that are not needed anymore will be deleted.
the function kccsrv_delete_connection wasn't tested yet.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-30 20:22:13 +11:00
Crístian Deives
7ca2ceb333 s4-drs: Create connection obejct (nTDSConnection)
create nTDSConnection objects to match the list of servers

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-30 20:22:13 +11:00
Erick Nascimento
a3632f22ec s4-drs: DsExecuteKCC() implementation
I implemented the DsExecuteKCC() handling code on kccsrv_execute_kcc().

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-14 12:11:02 +11:00
Andrew Tridgell
54bd30f706 s4-samdb: reduce the number of samdb opens at startup
Using common parameters means that the ldb_wrap code can return a
reference rather than a new database
2009-10-25 17:19:03 +11:00
Matthias Dieter Wallnöfer
e9686985cb s4: Changes the old occurences of "lp_realm" in "lp_dnsdomain" where needed
For KERBEROS applications the realm should be upcase (function "lp_realm") but
for DNS ones it should be used lowcase (function "lp_dnsdomain"). This patch
implements the use of both in the right way.
2009-10-14 10:50:43 +02:00
Andrew Tridgell
4a230b5e6c s4-kcc: fixed corruption of repsFrom records by kcc
We were re-using a stack variable outside of the stack scope
2009-09-28 15:36:10 +10:00
Andrew Tridgell
0b0edbb606 s4-kcc: remove stale repsFrom entries in kcc run 2009-09-28 13:11:25 +10:00
Andrew Tridgell
e9a589feac s4-server: kill main daemon if a task fails to initialise
When one of our core tasks fails to initialise it can now ask for the
server as a whole to die, rather than limping along in a degraded
state.
2009-09-18 18:05:55 -07:00
Andrew Tridgell
4687db00a8 s4-kcc: we should only add to the repsFrom if it doesn't already exist
If we already have a repsFrom for a particular DC and naming context
then we should not overwrite it, as it contains info on what
replication we've already done
2009-09-12 11:09:10 +10:00
Andrew Tridgell
61facf4266 s4-kcc: add a very simple KCC
A KCC is a 'Knowledge Consistency Checker', a fancy name for a daemon
that works out who will replicate with who in a AD domain. This
implements an extremely simple KCC task that just wants to replicate
with everyone :-)
2009-09-11 22:13:45 +10:00