summaryrefslogtreecommitdiffstats
path: root/source4/dsdb
Commit message (Collapse)AuthorAgeFilesLines
* s4-dsdb: call dsdb_make_schema_global() from ldb_wrapAndrew Tridgell2009-10-271-1/+0
| | | | | | | Calling it from samdb_connect() can cause a stale schema to be put into the global schema. Thanks to Andrew Bartlett for spotting this.
* s4-dsdb: always cancel transactions on all partitionsAndrew Tridgell2009-10-271-13/+19
| | | | | If we get an error ending a transaction on one partition we need to continue on the other partitions.
* s4:dsdb Rework partitions module for better tracingAndrew Bartlett2009-10-273-97/+76
| | | | | | | | | | | 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
* s4:dsdb Remove partition_extended_schema_update_nowAndrew Bartlett2009-10-271-51/+0
| | | | | | | The schema update now request is now handled above the partitions module. Andrew Bartlett
* s4-ldb: fixed request handling for schemaUpdateNow opAndrew Tridgell2009-10-263-3/+3
|
* s4-samdb: reduce the number of samdb opens at startupAndrew Tridgell2009-10-253-23/+8
| | | | | Using common parameters means that the ldb_wrap code can return a reference rather than a new database
* s4-dsdb: ensure that new partitions inherit any transactionAndrew Tridgell2009-10-253-11/+26
|
* s4:dsdb/partition_init: don't leak a talloc_new() in case we have no data yetStefan Metzmacher2009-10-241-2/+5
| | | | metze
* s4:dsdb 'attrs' must be static (otherwise segv with async)Andrew Bartlett2009-10-231-1/+2
| | | | | | The async code makes this really easy to mess up... Andrew Bartlett
* s4:dsdb Fix samba3sam test again.Andrew Bartlett2009-10-231-6/+9
| | | | | | | | | We again need to be careful not to call 'ldb_next_request' based functions in the partitions module. Or, we need to instead go back to having that work, and ditch the partition_request stuff... Andrew Bartlett
* s4:dsdb Add error string in 'no such object' because of 0 replies caseAndrew Bartlett2009-10-231-0/+3
|
* s4:dsdb Remove unused variablesAndrew Bartlett2009-10-231-2/+0
|
* s4:dsdb Do less allocation when searching for partitions modulesAndrew Bartlett2009-10-231-8/+10
| | | | | | (it didn't help that the previous allocation was on the wrong long-term context) Andrew Bartlett
* s4:dsdb Split schema loading and schema data managementAndrew Bartlett2009-10-233-231/+313
| | | | | | | | | | | By splitting the module this way, we can load the schema at startup, after the partitions module is operational, but we leave the 'mess with details of entries in the partitions' module to operate only on the partitions module. Loading the schema later allows us to set the @ATTRIBUTES correctly on all the databases. Andrew Bartlett
* s4:dsdb Set partitions metadata as soon as it is set up.Andrew Bartlett2009-10-231-3/+3
|
* s4-samdb: make sure the static credentials are never freedAndrew Tridgell2009-10-231-0/+9
|
* s4-ldbwrap: added re-use of ldb contexts in ldb_wrap_connect()Andrew Tridgell2009-10-231-1/+1
| | | | | | | | | This allows us to reuse a ldb context if it is open twice, instead of going through the expensive process of a full ldb open. We can reuse it if all of the parameters are the same. The change relies on callers using talloc_unlink() or free of a parent to close a ldb context.
* s4-dsdb: add a static samdb_credentialsAndrew Tridgell2009-10-231-5/+17
| | | | | Similarly to system_session(), this creates a static samdb_credentials()
* s4-dsdb: create a static system_session contextAndrew Tridgell2009-10-231-1/+1
| | | | | | This patch adds a system_session cache, preventing us from having to recreate it on every ldb open, and allowing us to detect when the same session is being used in ldb_wrap
* s4:dsdb/samdb/cracknames - Remove unused header and add more "const"Matthias Dieter Wallnöfer2009-10-221-4/+3
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb Use the 'correct' case for the namingContext values in rootDSEAndrew Bartlett2009-10-221-0/+22
| | | | | | | This makes the namingContext attributes in the rootDSE a little more pretty, by using the exact same values as used in the database DNs. Andrew Bartlett
* s4:dsdb Add default modules list to samba3samAndrew Bartlett2009-10-221-1/+2
| | | | | | | | This is needed because the work to allow existing databases to be loaded now moves the 'you have an old @PARTITION' record to the presense or absence of this attribute. Andrew Bartlett
* S4: ldb_map modules uses defines that are reservedTorgeir Lerkerød2009-10-212-117/+117
| | | | | | | On OpenSolaris MAP_RENAME and friends are defined in <sys/mman.h> e.g. mmap and friends. So on these systems MAP_* have a meaning. Cleaned up LDB name space by adding LDB_ in front of MAP_* e.g. MAP_RENAME => LDB_MAP_RENAME Signed-off-by: Torgeir Lerkerød <torgeir.lerkerod@gmail.com> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s4:dsdb Allow loading of old-style partition recordsAndrew Bartlett2009-10-211-19/+36
| | | | This should make upgrades easier
* s4:dsdb Make the 'relative path' code in partitions handle tdb://Andrew Bartlett2009-10-212-7/+15
| | | | | | | The previous code would fail if the caller used tdb:// in the URL for the top-level database. Andrew Bartlett
* s4:dsdb talloc_steal the backend module to under the partitionAndrew Bartlett2009-10-211-0/+1
|
* s4:dsdb Remove potentially confusing 'partition' control from resultAndrew Bartlett2009-10-211-3/+15
| | | | | | | This ensures that the partition control, needed here for repl_meta_data's internal work, is not pushed up to other callers. Andrew Bartlett
* s4:dsdb Allow creation of new partitionsAndrew Bartlett2009-10-212-70/+101
| | | | | | | | This is a collection of fixes to allow the creation of new partitions, as well as adding debugging that may be useful in chasing down future failures. Andrew Bartlett
* s4:dsdb Remove default instanceType from repl_meta_dataAndrew Bartlett2009-10-211-9/+0
| | | | | | | This is no longer required, as the instancetype module is now above repl_meta_data. Andrew Bartlett
* s4:dsdb Remove workaround for two partition head recordsAndrew Bartlett2009-10-211-16/+1
| | | | | | | The problem here has been avoided in repl_meta_data, and so this is no longer required. Andrew Bartlett
* s4:dsdb Use 'partition modified' information to update @REPLCHANGEDAndrew Bartlett2009-10-211-356/+189
| | | | | | | | | | | | | | | | | | | | This major rework of repl_meta_data changes it from using a static list of partitions to a dynamic list created from the controls placed on returned ldb results. To process these in one place, the similar but distinct callbacks are combined into a single replmd_op_callback(), which handles both the 'normal operation' and 'inbound replication' case. This allows new partitions to be created, and replication events for these new partitions to be scheduled immediately. Also in this commit: We no longer specify the target partition for new or modified objects - instead we allow the partitions module to use the DN as normal. THis avoids the issue where we would create two partition head records. Andrew Bartlett
* s4:repl Pass schema as argument to replmd_update_rpmd()Andrew Bartlett2009-10-211-6/+5
|
* s4:dsdb In partitions module, tell the caller what partition was used.Andrew Bartlett2009-10-211-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
* s4:dsdb Load new partitions in a running LDB if metadata changesAndrew Bartlett2009-10-212-144/+151
| | | | | | | This allows one instance of LDB to add a partition, and another to use it without first closing the database. Andrew Bartlett
* s4:dsdb Only reload partition metadata on search and transaction startAndrew Bartlett2009-10-212-19/+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
* s4:dsdb Reload partition metadata if the main db updatesAndrew Bartlett2009-10-213-39/+120
| | | | | | | 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
* s4:dsdb Split 'set per-partition metadata' into it's own functionAndrew Bartlett2009-10-211-139/+162
| | | | | | | | This helps us ensure we always set the metadata, even when we are 'adding' a partition that is already in our list. (We *really* don't want these getting out of sync, and the extra writes are harmless) Andrew Bartlett
* s4:dsdb Don't try and casefold DNs during startup for partition loadAndrew Bartlett2009-10-211-10/+19
| | | | | | | | | The issue here is that before we load the schema partition, we may not have the correct casefolding rules. As such, keep things simple and use the DN exactly as found in the @PARTITIONS record to find the database. Andrew Bartlett
* s4:dsdb Fix partition_create not to return earlyAndrew Bartlett2009-10-211-14/+22
|
* s4:dsdb Fix tests for samba3sam to pass after partitions module changesAndrew Bartlett2009-10-211-13/+9
| | | | | | | This is needed because the new format of the partitions record is a casefolded DN, not a DN and file combination. Andrew Bartlett
* s4:dsdb Be strict in selecting on-disk names for partitionsAndrew Bartlett2009-10-212-6/+84
| | | | | | I really don't want a cn=foo/../bar in my ldb file name. Andrew Bartlett
* s4:dsdb Set 'notification' after the success of a change.Andrew Bartlett2009-10-211-18/+14
| | | | | | | | This allows the partition to be created before we try and set a notification on it. (perhaps extra work required here for partition heads). Andrew Bartlett
* s4:dsdb Rework modules create new partitions at runtimeAndrew Bartlett2009-10-217-311/+840
| | | | | | | | | | | | | | 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
* s4/drs: prefixMap main interface implementationKamen Mazdrashki2009-10-211-0/+244
| | | | | | Currenly implemented functions are: dsdb_schema_pfm_new(), dsdb_schema_pfm_make_attid() and dsdb_schema_pfm_oid_from_attid()
* s4/drs(tort): Unit test for prefixMap implementation.Kamen Mazdrashki2009-10-212-4/+4
| | | | | | Currenly those tests cover only the main part of the interface, i.e. dsdb_schema_pfm_new(), dsdb_schema_pfm_make_attid() and dsdb_schema_pfm_oid_from_attid()
* s4-dsdb: fixed empty structure error on solaris8Andrew Tridgell2009-10-201-0/+1
| | | | | | Nadya, I'm guessing you plan on adding some real elements to this structure later. For now I've added _dummy so the build can continue with the Solaris C compiler.
* s4:password_hash LDB module - substitute "lp_workgroup" with "lp_sam_name"Matthias Dieter Wallnöfer2009-10-191-1/+1
| | | | | According to abartlet's response on my post about "lp_workgroup" this should be the right call.
* s4:sites - get the server site (name) from DSDBMatthias Dieter Wallnöfer2009-10-181-0/+10
|
* s4-privileges: moved privileges to private/privilege.ldbAndrew Tridgell2009-10-171-6/+25
| | | | | | | We were storing privileges in the sam, which was OK when we were a standalone DC, but is no good when we replicate with a windows DC. This moves the privileges to a separate (local) database
* s4/drs: prefixMap module initial definitionKamen Mazdrashki2009-10-163-1/+69
|