summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/partition.c
AgeCommit message (Collapse)AuthorFilesLines
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)
2008-07-24Handle schema reloading request.Anatoliy Atanasov1-0/+49
The ldif for that operation looks like this: dn: changetype: Modify add: schemaUpdateNow schemaUpdateNow: 1 It uses the rootdse's object functional attribute schemaUpdateNow. In rootdse_modify() this command is being recognized and it is send as extended operation with DSDB_EXTENDED_SCHEMA_UPDATE_NOW_OID. In the partition module its dispatched to the schema_fsmo module. The request is processed in the schema_fsmo module by schema_fsmo_extended(). (This used to be commit 39f9184ddf215f2b512319211c0a05702218ef87)
2008-07-15Simplify the contextCSN determination.Andrew Bartlett1-0/+5
We only ever have one backend partition per Samba partition. Andrew Bartlett (This used to be commit 316a9b312a2d4a4ea5a5c70946fb06b61fab1a7d)
2008-04-02Install public header files again and include required prototypes.Jelmer Vernooij1-1/+1
(This used to be commit 47ffbbf67435904754469544390b67d34c958343)
2008-03-28Convert some more files to GPLv3.Andrew Kroeger1-1/+1
(This used to be commit ebe5e8399422eb7e2ff4deb546338823e2718907)
2008-02-20Fix use of some modules (needed _PUBLIC_).Jelmer Vernooij1-2/+2
(This used to be commit ce332130ea77159832da23bab760fa26921719e2)
2008-02-20Use struct-based rather than function-based initialization for ldb modules ↵Jelmer Vernooij1-6/+1
everywhere. (This used to be commit 85c96a325867f7bcdb412ebc53f8a47dbf7cd89b)
2008-01-16Rework control handling to remove the 'domain_scope' controlAndrew Bartlett1-17/+37
Also remove the search_options control earlier, before, rather than after duplicating the request. When we generate referalls in the partition module, the domain_scope control with suppress them. Andrew Bartlett (This used to be commit fc57a119f53a7bc0a0eb76b868bbd7386b3c5008)
2007-12-21r26483: Merge ldb module dependency fixes, fix auth python module.Jelmer Vernooij1-9/+13
(This used to be commit 85eeecf997a071ca7e7ad0247e8d34d49b7ffcbb)
2007-12-21r26360: Add some const.Jelmer Vernooij1-1/+1
(This used to be commit 3616ced29ed2385300f7268a742a9090840b626f)
2007-12-21r25941: Use samdb_relative_path() (new function in samdb.c) in the partitionsAndrew Bartlett1-30/+3
module. Andrew Bartlett (This used to be commit c8d1ab30845fa1496c85630b138b1cb512c2b6aa)
2007-12-21r25710: Finally fix subtree renames. Untested code is broken code and in thisAndrew Bartlett1-0/+17
case an oddity of the javascript caused the test to 'pass'. For the same oddity, we have a failure in ldb's handling of spaces in DNs. We need to resolve that too. Andrew Bartlett (This used to be commit e8cbac1a46f4d3b083e6bb5a509ef1ba47bebff1)
2007-12-21r25701: Clarify commentAndrew Bartlett1-1/+1
(This used to be commit cea496d2163db6dde371526dd5a79d4c090839ef)
2007-10-10r25000: Fix some more C++ compatibility warnings.Jelmer Vernooij1-3/+6
(This used to be commit 08bb1ef643ab906f1645cf6f32763dc73b1884e4)
2007-10-10r24731: Remove unused code - if we hit these error conditions, then we areAndrew Bartlett1-16/+0
dead anyway, and a segfault would leave us with more infomation. Andrew Bartlett (This used to be commit 62320616ff8795ff18c8f49029d81f12558c10ed)
2007-10-10r24690: Further fix to bug 4919: Ensure we don't supply a NULL URL argument toAndrew Bartlett1-0/+5
ldb_connect_backend(). Andrew Bartlett (This used to be commit d0595e7a3d15c40dd49062efa0ddc6864b6b9030)
2007-10-10r24655: Fix bug 4919 reported by Matthias Wallnöfer <mwallnoefer@yahoo.de>:Andrew Bartlett1-3/+2
> When you change to the SAMBA private directory on a shell (default > /usr/local/samba/private) and start there for example ldbedit with the sam.ldb, > the application crashes if you don't put the "./" before the filename. I've adapted Matthias's patch. Andrew Bartlett (This used to be commit ba82197e30da8e626419e877d224431703edc866)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell1-3/+2
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 fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10r23762: Fix DN renames over LDAP, and instrument the partition module. Add aAndrew Bartlett1-22/+24
test to prove the behaviour of LDAP renames etc. Fix LDB to return correct error code when failing to rename one DN onto another. Andrew Bartlett (This used to be commit 3f3da9c4710b7752ed97f55c2fc3d32a63d352af)
2007-10-10r22681: Fix standalone ldb build when parent directory name != ldb.Jelmer Vernooij1-1/+1
(This used to be commit 1093875d59f1ea9b8bd82277d4f9d8366e584952)
2007-10-10r22557: Simo has long bugged me that the paths in the sam.ldb partitions wereAndrew Bartlett1-1/+30
not relative to the location of the sam.ldb, but instead lp_private_dir(). This fixes that issue. Andrew Bartlett (This used to be commit c0fd6f63399d55a1938e31ae7b10689cc02ff2fa)