summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/partition.c
AgeCommit message (Collapse)AuthorFilesLines
2013-04-19s4:dsdb: Fix warnings about not set / set but unused / shadowed variablesMatthieu Patou1-3/+0
Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Apr 19 13:15:40 CEST 2013 on sn-devel-104
2012-08-11s4-dsdb: Remove support for per-partition sequence numbersAndrew Bartlett1-23/+0
These sequence numbers were only used for telling if the schema was changed, and are no longer directly related to the replication USN. The per-partition replication USN can be obtained from the @REPLCHANGED record on the per-partition database, and this is done with an ldb_search(). Andrew Bartlett
2012-08-09s4-dsdb: Do not reload partition metadata except on transaction startAndrew Bartlett1-11/+0
This ensures that we do not add objects that should go into a partition, but we simply return that an object is not present if the connection was created before the partition was loaded. It is rare to create a new partition. Andrew Bartlett
2012-08-09s4-dsdb: Change talloc parentAndrew Bartlett1-1/+1
This matches the rest of the function. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Aug 9 06:26:36 CEST 2012 on sn-devel-104
2012-08-09s4-dsdb: Remove ldb_sequence_type argument from ↵Andrew Bartlett1-3/+3
partition_primary_sequence_number We always want LDB_SEQ_HIGHEST_SEQ here. Andrew Bartlett
2012-08-09s4-dsdb: simplify migration of old-style seqence numbers to metadata.tdbAndrew Bartlett1-94/+52
This simple operation does not need to be encased in generic ldb extended operations. Andrew Bartlett
2012-08-09s4-dsdb: Reduce calls to the ldb layer by reloading less oftenAndrew Bartlett1-14/+20
We do not need to reload the partition list to get the global sequence number, as that number is stored in the metadata.tdb, not the ldb files. Andrew Bartlett
2012-06-22s4-dsdb: Add/Update SCHEMA_SEQ_NUM key in the metadata.tdb after schemaUpdateNowMatthieu Patou1-0/+7
The idea is to signal to other process accessing the database that the schema was forced to be reloaded and so they should reload as well.
2011-11-29s4-dsdb: Added metadata to partition module for global sequence numberAmitay Isaacs1-16/+106
This adds support for global sequence number which is independent of partition information. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-11-29s4-dsdb: use dsdb_module_extended instead of duplicate codeAmitay Isaacs1-30/+12
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-11-29s4-dsdb: Remove LDB_SEQ_HIGHEST_TIMESTAMP sequence number supportAmitay Isaacs1-135/+11
This was a hack for LDAP backends to store a sequence number as a timestamp. It is still supported in standalone ldb tdb backend. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-11-17s4-dsdb: Remove unsed variableAmitay Isaacs1-2/+0
2011-11-15s4:partition LDB module - fix handling regarding special DNs on searchesMatthias Dieter Wallnöfer1-0/+5
Normally they should always be passed to the main backend unless something different has been specified. Reviewed-by: abartlet Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue Nov 15 22:43:06 CET 2011 on sn-devel-104
2011-09-22s4-dsdb: load the partialReplica attribute in the @PARTITION objectAndrew Tridgell1-0/+12
this modifies the partition module to honor a partialReplica attribute on the @PARTITION module, marking partiations as partial replicas so the NO_GLOBAL_CATALOG control can be honoured
2011-09-19s4-dsdb: cope with out of sync replication attributes in partition moduleAndrew Tridgell1-1/+68
if the @ATTRIBUTES or other objects which are replicated between partions become out of sync, then the ldb would fail to open. This changes ensures that we can always fix those records, by running the operation in the top level partition, and replicating the result to the other partitions Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Mon Sep 19 04:31:48 CEST 2011 on sn-devel-104
2011-08-25s4-dsdb: enforce NULL DN validity in partition moduleAndrew Tridgell1-0/+3
windows does not allow a search on the empty DN except for rootDSE searches or for phantom_root searches (ie. with --cross-ncs). By enforcing this in Samba we make it more likely that our tests and utilities will work against windows Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-10s4:partition LDB module - the current partition control should only be added ↵Matthias Dieter Wallnöfer1-6/+18
if requested That means if the informations before a request are unknown ("repl_meta_data" LDB module) then an empty control (no data) has to be sent.
2011-03-10s4:partition LDB module - extended operations - make the initialisation ↵Matthias Dieter Wallnöfer1-2/+4
check consistent To the other operations.
2011-03-10s4:partition LDB module - move the "data" check a bit higherMatthias Dieter Wallnöfer1-4/+5
It can be performed a bit earlier.
2011-03-10s4:partition LDB module - "partition_replicate" doesn't handle the search ↵Matthias Dieter Wallnöfer1-1/+1
requests That is done by "partition_search".
2011-03-10s4:partition LDB module - "partition_sequence_number" - remove meaningless "if"sMatthias Dieter Wallnöfer1-16/+12
These current partition controls are always added for the two EXOP operations.
2011-03-10s4:partition LDB module - fill in parent requests for inheriting the flagsMatthias Dieter Wallnöfer1-3/+3
Probably it doesn't matter in this cases but just for consistency.
2011-03-10s4:partition LDB module - add some commentsMatthias Dieter Wallnöfer1-1/+4
2011-03-10s4:partition LDB module - fix typoMatthias Dieter Wallnöfer1-1/+1
2011-01-17s4-dsdb: pass parent request to dsdb_module_*() functions Andrew Tridgell1-3/+3
this preserves the request hierarchy for dsdb_module_*() calls inside dsdb ldb modules Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-18ldb: Rename last instance of save_controls -> ldb_save_controls.Jelmer Vernooij1-1/+1
2010-11-03s4-dsdb: removed the use of ldb_private.h from s4Andrew Tridgell1-36/+36
this will allow s4 to use a system version of ldb
2010-11-01s4-ldb: enable version checking in dsdb ldb modulesAndrew Tridgell1-0/+1
2010-11-01s4-dsdb: convert the rest of the ldb modules to the new module typeAndrew Tridgell1-1/+6
2010-09-25ldb: mark the location of a lot more ldb requestsAndrew Tridgell1-0/+10
2010-07-16s4-loadparm: 2nd half of lp_ to lpcfg_ conversionAndrew Tridgell1-1/+1
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-07s4-dsdb: use ldb_operr() in the dsdb codeAndrew Tridgell1-28/+22
this replaces "return LDB_ERR_OPERATIONS_ERROR" with "return ldb_operr(ldb)" in places in the dsdb code where we don't already explicitly set an error string. This should make is much easier to track down dsdb module bugs that result in an operations error.
2010-06-29Revert "s4/dsdb: Fixed partition_search() not to pass special DN's to LDAP ↵Matthias Dieter Wallnöfer1-8/+6
backend." This reverts commit ed4c107bc1eac8531fdd8d09f7698efcbc7ecb14. See post "Endi's Bug 7530 patches (LDAP backend)" on samba-technical.
2010-06-28s4/dsdb: Fixed partition_search() not to pass special DN's to LDAP backend.Endi S. Dewata1-6/+8
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2010-05-04s4/rodc: Support read-only databaseAnatoliy Atanasov1-2/+1
Check on modify if we are RODC and return referral. On the ldap backend side now we pass context and ldb_modify_default_callback to propagate the referral error to the client.
2010-03-07s4:partition LDB module - change counter variables to "unsigned" where ↵Matthias Dieter Wallnöfer1-10/+14
appropriate
2010-02-25s4:partition DSDB module - Generate basic referralsMatthias Dieter Wallnöfer1-47/+143
This is a first, very basic implementation of the referrals (more informations at MS-ADTS 3.1.1.4.6 and 3.1.1.3.4.1.12). To have the full referral support (and to always point to the right host) the full implementation using DNS will be needed (at the moment we always point to the main DC which is referenceable through the DNS domainname). Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-02-25s4:partition DSDB module - change the search and domain scope control handlingMatthias Dieter Wallnöfer1-35/+22
The domain scope control is always removed, from the search one only the two interesting flags (which are handled) and it is marked as non-critical. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-02-21s4:partition DSDB module - Cosmetic fixupsMatthias Dieter Wallnöfer1-16/+23
2010-01-08s4-partition: fixed selection of partitions on exact matchAndrew Tridgell1-3/+1
When a search is on the root of a partition on the global catalog, don't search partitions above that one.
2010-01-08s4-partition: don't ignore errors from other modulesAndrew Tridgell1-6/+2
if we get an error code from a lower module, we don't want to ignore it just because something also succeeded
2009-10-27s4-dsdb: always cancel transactions on all partitionsAndrew Tridgell1-13/+19
If we get an error ending a transaction on one partition we need to continue on the other partitions.
2009-10-27s4:dsdb Rework partitions module for better tracingAndrew Bartlett1-67/+55
This means we need to create a fake 'module' which only has a 'next' pointer, so that we can now ldb_next_request() (which incorporates tracing). The remainaing stub of partition_request() is retained so that we can indicate which partition an operation is destined for. Similar tracing is added to the transaction handlers. Andrew Bartlett
2009-10-27s4:dsdb Remove partition_extended_schema_update_nowAndrew Bartlett1-51/+0
The schema update now request is now handled above the partitions module. Andrew Bartlett
2009-10-26s4-ldb: fixed request handling for schemaUpdateNow opAndrew Tridgell1-1/+1
2009-10-25s4-dsdb: ensure that new partitions inherit any transactionAndrew Tridgell1-0/+15
2009-10-21s4:dsdb Remove workaround for two partition head recordsAndrew Bartlett1-16/+1
The problem here has been avoided in repl_meta_data, and so this is no longer required. Andrew Bartlett
2009-10-21s4:dsdb In partitions module, tell the caller what partition was used.Andrew Bartlett1-1/+17
This means we don't return any control for modifications to the control records in sam.ldb, but do if they modified one of the actual data LDB files. Andrew Bartlett
2009-10-21s4:dsdb Load new partitions in a running LDB if metadata changesAndrew Bartlett1-1/+0
This allows one instance of LDB to add a partition, and another to use it without first closing the database. Andrew Bartlett
2009-10-21s4:dsdb Only reload partition metadata on search and transaction startAndrew Bartlett1-10/+5
I see no reason to reload it when in a transaction - it can't change on us anyway (we possibly need to watch for our own changes to @PARTITION however) Andrew Bartlett