summaryrefslogtreecommitdiffstats
path: root/source4/dsdb/kcc
Commit message (Collapse)AuthorAgeFilesLines
* Fix the O3 developer buildVolker Lendecke2015-03-031-4/+5
| | | | | | | | | | Different gcc versions complain at different places Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Mar 3 13:14:53 CET 2015 on sn-devel-104
* Fix the developer O3 buildVolker Lendecke2015-02-251-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Wed Feb 25 16:32:29 CET 2015 on sn-devel-104
* dsdb: Be less verbose when announcing kcc is being invoked.Jelmer Vernooij2014-09-271-1/+1
| | | | | | Change-Id: I94ab7d92e7e4f4311f0b20b1072c3ad05155d068 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb/kcc: use SHOW_RECYCLED instead of SHOW_DELETED in when deleting ↵Stefan Metzmacher2014-07-091-1/+1
| | | | | | | | | | | tombstone/deleted objects SHOW_RECYCLED implies SHOW_DELETED. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10694 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Use GUID_equal in a few placesVolker Lendecke2014-06-102-5/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dsdb: Make it harder to corrupt the database by requiring DBCHECK or RELAX ↵Andrew Bartlett2014-05-031-1/+1
| | | | | | | | | | | | | | | for final object deletion This kind of deletion can cause us to then replicate back a partial object. We allow dbcheck to directly remove totally corrupt objects (missing an objectclass) by specifying both DBCHECK and RELAX, and the tombstone sweep after 180 days is done with the RELAX control. Andrew Bartlett Change-Id: Ic21f68e507ba9b65e035ca568430e35e2d001c7d Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Remove the remaining uses of the macro NT_STATUS_HAVE_NO_MEMORY_AND_FREE in ↵Garming Sam2014-03-051-6/+12
| | | | | | | | | | | | | the codebase. Following the current coding guidelines, it is considered bad practice to return from within a macro and change control flow as they look like normal function calls. Change-Id: Id1b540cde127395a7b27385a7c0fe79f3a145c73 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Remove a number of NT_STATUS_HAVE_NO_MEMORY_AND_FREE macros from the codebase.Garming Sam2014-03-051-25/+100
| | | | | | | | | | | Following the current coding guidelines, it is considered bad practice to return from within a macro and change control flow as they look like normal function calls. Change-Id: I133eb5a699757ae57b87d3bd3ebbcf5b556b0268 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dsdb: Allow dsdb_find_dn_by_guid to show deleted DNsAndrew Bartlett2013-06-122-4/+10
| | | | | | | | | This helps us in the KCC as we need to return the deleted DN for the GUID in DsReplicaGetInfo calls (tested for deleted servers against Windows 2008R2). Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Fix warnings about set but unused variablesMatthieu Patou2013-05-202-10/+1
| | | | | | Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* drs-replica-info: level_not_supported is wrong when we do support (partialy ↵Matthieu Patou2012-10-071-9/+13
| | | | the level)
* s4-dsdb: Use tmp_ctx in kccsrv_check_deleted to avoid leaking memory onto ↵Andrew Bartlett2012-08-171-6/+11
| | | | | | | | | | | | | | | | | | | part->dn The confusing use of do_dn as a memory context while legitimate created a bug when it was copied and modified to search on a DN from long-term state. By always using a temporary memory context it is clear what paramter is the memory context. This was found based on a log provided by Ricky Nance <ricky.nance@weaubleau.k12.mo.us>. Thanks Ricky! Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Aug 17 18:24:10 CEST 2012 on sn-devel-104
* s4-kcc: Avoid use-after-free of dn and add tmp_ctxAndrew Bartlett2012-08-171-2/+9
| | | | | | By using a tmp_ctx we are clearer about allocating temporary memory. Andrew Bartlett
* s4-dsdb: Add mem_ctx argument to samdb_ntds_settings_dnAndrew Bartlett2012-08-143-4/+4
| | | | | | | | | | | | | | As this value is calculated new each time, we need to give it a context to live on. If the value is the forced value during provision, a reference is taken. This was responsible for the memory leak in the replication process. In the example I was given, this DN appeared in memory 13596 times! Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Aug 14 10:05:14 CEST 2012 on sn-devel-104
* s4-dsdb: Improve memory handling in kccsrv_add_connection()Andrew Bartlett2012-08-141-0/+5
|
* s4-dsdb: Improve memory handling in kccsrv_find_connections() by adding a ↵Andrew Bartlett2012-08-141-4/+15
| | | | tmp_ctx
* lib/param: Create a seperate server role for "active directory domain ↵Andrew Bartlett2012-06-151-1/+1
| | | | | | | | | | | | | | | controller" This will allow us to detect from the smb.conf if this is a Samba4 AD DC which will allow smarter handling of (for example) accidentially starting smbd rather than samba. To cope with upgrades from existing Samba4 installs, 'domain controller' is a synonym of 'active directory domain controller' and new parameters 'classic primary domain controller' and 'classic backup domain controller' are added. Andrew Bartlett
* s4-kcc: avoid a false alarm with rodcMatthieu Patou2012-04-191-0/+7
| | | | | Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Thu Apr 19 12:32:58 CEST 2012 on sn-devel-104
* s4-dsdb: Fix the case for attribute name msDS-hasMasterNCsAmitay Isaacs2012-03-141-2/+2
| | | | | Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Wed Mar 14 11:59:02 CET 2012 on sn-devel-104
* s4-kcc: Remove also deleted objects that are not in the Deleted Object containerMatthieu Patou2011-12-232-2/+38
| | | | | | | | For the configuration container we do a full scan at every run of the kcc-delete service. For the base DN we introduce a new parameter that avoid the full scan to kick just when samba starts. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Invocation of samba_kcc from KCC taskDave Craft2011-12-082-20/+88
| | | | | | | | | Modification to periodic and explicit invocation paths of the KCC topology generation code. Managed via samba_runcmd_send() API. The samba_kcc script is invoked if (kccsrv:samba_kcc = true) appears in smb.conf Signed-off-by: Andrew Tridgell <tridge@samba.org>
* Add subreq and status to kcc_service structDave Craft2011-12-081-2/+9
| | | | | | | | The subreq and status fields in the kcc_service struct are added for execution management of the external samba_kcc python script. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4-kcc: if we are a GC, auto-add partial replicasAndrew Tridgell2011-10-041-3/+147
| | | | | when we are a global catalog server, the KCC needs to add partial replicas for all domain partitions that we don't have copies of
* s4-kcc: return partial replica NCs in drs showreplAndrew Tridgell2011-09-221-24/+20
| | | | | the showrepl operation should return all our replicated NCs, including partial replicas
* s4-kcc: Fix the list of NCs for DRS replica informationAmitay Isaacs2011-09-071-3/+21
| | | | | AD DNS partitions (DomainDnsZones and ForestDnsZones) are listed under msDs-hasMasterNCs attribute for post-2003 windows servers.
* s4-kcc: fixed _msdcs DNS nameAndrew Tridgell2011-08-251-3/+1
| | | | | | | we need to base this DNS name on the forest DNS name for multi-domain support Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* s4:dsdb: use tevent_ fn names instaed of legacy event_ onesSimo Sorce2011-08-131-1/+1
|
* s4-kcc: correctly populate the neighbor object when taking information from ↵Matthieu Patou2011-07-311-0/+3
| | | | | | | repsTo Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Sun Jul 31 00:17:17 CEST 2011 on sn-devel-104
* s4-kcc: use dsdb_delete() instead of ldb_delete()Andrew Tridgell2011-07-211-1/+1
| | | | | | | this adds the DSDB_SEARCH_SHOW_DELETED flag, which fixes deletion of deleted objects Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* Add intrasite code test switchDave Craft2011-07-142-0/+9
| | | | | | | | | | | | | | kcc_service struct gets a intrasite_code boolean that is filled in via parametric parameter kccsrv:intrasite = [true/false] in smb.conf. This will allow us to continue to utilize old simple KCC topology as continuing default while newer intra-site topology matures further. Signed-off-by: Andrew Tridgell <tridge@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Jul 14 00:19:12 CEST 2011 on sn-devel-104
* Add kccsrv_add_repsFrom() possibility of NULL res argumentDave Craft2011-07-141-2/+2
| | | | | | | | | | | | We need the ability to utilize this function in a different manner. KCC intra-site topology has already vetted the replica as being appropriate to produce a repsFrom from. We do not want kccsrv_add_repsFrom() to produce further checking as was the case for simple topology. Thus if we pass a NULL (res) parameter this extra check will be skipped. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* Remove static to allow availability to other KCC filesDave Craft2011-07-141-4/+4
| | | | | | | | kccsrv_replica_flags() and kccsrv_add_repsFrom() need to be available to functions outside kcc_periodic.c Signed-off-by: Andrew Tridgell <tridge@samba.org>
* kcc_connection invocation_id added to structDave Craft2011-07-141-0/+1
| | | | | | | | | | Utilized by KCC to carry the invocation id of the NTDSDSA that we are replicating the name context from. Utilized when NTDSConnection is created (much like dsa_guid tracks the NTDSDSA objectGUID that we are replicating the name context from). Signed-off-by: Andrew Tridgell <tridge@samba.org>
* KCC NTDSConnection should utilize NTDSCONN_OPT_IS_GENERATEDDave Craft2011-07-141-1/+9
| | | | | | | Previously this set an explicit (0x1) value whereas it can now utilize NTDSCONN_OPT_IS_GENERATED from flags.h Signed-off-by: Andrew Tridgell <tridge@samba.org>
* NTDSConnection and NTDSA Site setting flagsDave Craft2011-07-141-8/+0
| | | | | | | | | Flags that were missing from flags.h or were incorrectly defined inline to the kcc_topology.c code (and thus unusable elsewhere). These are the NTDSConnection and NTDSDSA Site settings flags. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4:dsdb - always handle the attribute "options" as 32bit unsigned integerMatthias Dieter Wallnöfer2011-03-012-19/+20
| | | | | | | | | | It is defined as LDAP syntax 2.5.5.9 so no need at all to treat it as 64-bit integer. Reviewed by: Kamenim and Metze Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue Mar 1 12:46:15 CET 2011 on sn-devel-104
* ldb: use #include <ldb.h> for ldbAndrew Tridgell2011-02-105-5/+5
| | | | | | | | 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>
* s4-kcc: fixed valgrind errors in drs replicaInfo server sideAndrew Tridgell2010-11-261-7/+5
| | | | | | | 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
* s4-kcc: disable the NDR printing of DRS getinfo requestsAndrew Tridgell2010-11-241-0/+4
|
* s4-rodc: enable the DRS_GET_ALL_GROUP_MEMBERSHIP flag for RODC replicationAndrew Tridgell2010-11-181-0/+1
| | | | see the description of this flag in [MS-DRSR]
* s4-kcc: fixed result_last_attempt in showreplAndrew Tridgell2010-11-171-0/+1
|
* s4-debug: lowered the debug level of some unimportant messagesAndrew Tridgell2010-11-081-2/+2
|
* s4:dsdb/kcc: fix memory leak in kcctpl_copy_output_edges()Stefan Metzmacher2010-11-041-0/+1
| | | | metze
* s4 dsdb kcc: Prefer msDS-hasMasterNCs over hasMasterNCs when replicatingKai Blin2010-10-231-5/+10
|
* s4:dsdb - remove "samdb_result_uint", "samdb_result_int64", ↵Matthias Dieter Wallnöfer2010-10-152-20/+20
| | | | | | | | | "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>
* samdb: Add flags argument to samdb_connect().Jelmer Vernooij2010-10-101-1/+1
|
* s4:dsdb - substitute the "show_deleted" with the "show_recycled" controlMatthias Dieter Wallnöfer2010-10-031-1/+1
| | | | | | | | | | | 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>
* s4-kcc: silence "Testing kcctpl_create_intersite_connections" messageAndrew Tridgell2010-10-031-1/+1
| | | | | Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Sun Oct 3 04:51:44 UTC 2010 on sn-devel-104
* s4-kcc: remove stale repsTo entries in the KCCAndrew Tridgell2010-10-021-0/+32
| | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-kcc: fixed the replica_flags in repsFrom in the kccAndrew Tridgell2010-09-291-31/+72
| | | | | | | 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>