summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/partition.c
AgeCommit message (Collapse)AuthorFilesLines
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
2009-10-21s4:dsdb Reload partition metadata if the main db updatesAndrew Bartlett1-39/+80
This uses the fact that the primary DB does not change often. Before each operation, we see if the sequence number has changed. Andrew Bartlett
2009-10-21s4:dsdb Rework modules create new partitions at runtimeAndrew Bartlett1-303/+6
This is done by passing an extended operation to the partitions module to extend the @PARTITION record and to extend the in-memory list of partitions. This also splits things up into module parts that belong above and below repl_meta_data Also slit the partitions module into two files due to the complexity of the code Andrew Barltett
2009-10-06s4:various LDB modules - "build_request" functions - propagate result codes backMatthias Dieter Wallnöfer1-6/+14
It's very useful to know the exact result code when something fails and not only a generic (by the module) created one. Sure, there are some exception cases with specific results (special message constellations, attributes, values...) which shouldn't be changed at all (examples of them are in the "ldap.py" test). Therefore I looked very carefully to not change them.
2009-09-28s4-dsdb: don't return the partition root objectsAndrew Tridgell1-1/+19
When searching across partitions, we want to avoid sending duplicate records caused by the record appearing both as a mount point and as a partition root in a nested partition. This patch works by intercepting objects from searches and checking if they match a partition root. If they do, and the partition is not the one in the partition control request, then discard the object.
2009-09-13s4-sam: allow a search to specify a partitionAndrew Tridgell1-2/+17
You can now attach a partition control to searches to search within a specific partition. This is used to get at the per-partition @REPLCHANGED object
2009-09-12s4-samdb: make it possible to ask for the sequence number of a partitionAndrew Tridgell1-0/+9
The partition module normally makes the sequence number extended op operate across all partitions. It will be useful in the repl task to be able to ask for the sequence number of one partition
2009-09-12s4-samdb: internal s4 ldb modules should be GPL not LGPLAndrew Tridgell1-4/+0
I think these modules ended up LGPL because someone based the module on an existing LGPL module in the core ldb, and it spread from there. Certainly there is no reason for the ldb modules that are not distributed as part of ldb to be LGPL.
2009-09-03greatly simplify the transaction processing in the partition moduleAndrew Tridgell1-51/+29
Now that ldb is calling prepare commit separately, the job of the partition module on transaction end is much simpler (and more robust!)
2009-09-02change the dsdb_control_current_partition to not include internal variablesAndrew Tridgell1-76/+86
This structures was used in two ways. In one way it held variables that are logically internal to the partition module, and in the other way it was used to pass the partition DN down to other modules. This change makes the structure contain just the dn which is being passed down. This change is part of the support for linked attributes. We will be passing this control down from above the partition module to force which partition a request acts upon. The partition module now only adds this control if it isn't already there.
2009-07-08Fix for schemaUpdateNow commandAnatoliy Atanasov1-1/+7
2009-06-30s4: dsdb Avoid using the internal ldb_private.h headerAndrew Bartlett1-58/+61
This job is not complete (the partition module remains a unfinished task), but now we do use the private ldb headers much less. Andrew Bartlett
2009-06-29Correct some typos in the LDB partition moduleMatthias Dieter Wallnöfer1-5/+5
2009-06-18dsdb: Fix build against system ldb.Jelmer Vernooij1-1/+1
2009-04-22s4:ldb: fix extrasemi compile warningBjörn Jacke1-1/+1
2009-03-31use the prepare_commit op in the partition codeAndrew Tridgell1-14/+49
This makes multi-partition ldb's much safer
2009-01-30Fix the mess with ldb includes.Simo Sorce1-1/+1
Separate again the public from the private headers. Add a new header specific for modules. Also add service function for modules as now ldb_context and ldb_module are opaque structures for them.
2008-12-23Fix more compiler warnings in various places.Jelmer Vernooij1-4/+4
2008-12-17s4:ldb: make it possible to return per entry controlsAndrew Bartlett1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17Fix sequence number generation against OpenLDAPAndrew Bartlett1-0/+8
It seems that in 2deeb99fff1a90c79ba1927e1a069362e250a63c adding the partition control to this request was missed out. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-10-20Make sure prototypes are always included, make some functions static andJelmer Vernooij1-1/+1
remove some unused functions.
2008-10-16Transform the sequence_number operation into a normal extended operation as ↵Simo Sorce1-60/+186
it should always have been. Make it also async so that it is not a special case.
2008-10-06Remove compleatly bogus rename test in partitions module.Andrew Bartlett1-17/+0
2008-10-03Merge commit 'master/master'Andrew Tridgell1-0/+22
2008-10-03fixed the partition module and the GC handlingAndrew Tridgell1-4/+38
- when multiple partitions are searched, consider the search a success if any of the partitions return success - only search the right subset of partitions, looking at the scope and basedn of the search This fixes several errors with GC searches
2008-10-02fixed the sense of ldb base dn comparisons in two places, and use aAndrew Tridgell1-2/+2
direct comparison instead of a sub-tree comparison in another this fixes basedn searches on the global catalog port
2008-10-02s4:partition: register DOMAIN_SCOPE and SEARCH_OPTIONS controlsStefan Metzmacher1-0/+14
metze
2008-10-02s4:partition: pass down the SEARCH_OPTIONS control as uncriticalStefan Metzmacher1-0/+8
metze
2008-09-29LDB ASYNC: samba4 modulesSimo Sorce1-261/+334
2008-09-23Merge ldb_search() and ldb_search_exp_fmt() into a simgle function.Simo Sorce1-5/+3
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-08-21Don't walk past the end of ldb values.Andrew Bartlett1-1/+1
This is a partial fix towards bugs due to us walking past the end of what we think are strings in ldb. There is much more work to do in this area. Andrew Bartlett (This used to be commit 5805a9a8f35fd90fa4f718f73534817fa3bbdfd2)