summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* S4: Building on a system with libintlTorgeir Lerkerød2009-10-211-0/+5
| | | | | | | Heimdal's internal buildsystem uses a different define for checking for libintl than what samba uses. LIBINTL vs HAVE_LIBINTL_H. Since changing heimdals defineswould brake dropin merges of heimdal. This is a simple workaround in line with others in heimdal_build catalog. Signed-off-by: Torgeir Lerkerød <torgeir.lerkerod@gmail.com> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* lib/tdb: make tdbtool use tdb_check() for "check" commandRusty Russell2009-10-222-15/+31
| | | | | | | Also, set logging function so we get more informative messages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb: add tdb_check()Rusty Russell2009-10-228-3/+441
| | | | | | | | ctdb wants a quick way to detect corrupt tdbs; particularly, tdbs with loops in their hash chains. tdb_check() provides this. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb: add -t (always use transactions) option to tdbtortureRusty Russell2009-10-221-12/+29
| | | | | | | This means you can kill it at any time and expect no corruption. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb: wean off TDB_ERRCODE.Rusty Russell2009-10-229-40/+59
| | | | | | | | | | It was a regrettable hack which I used to reduce line count in tdb; in fact it caused confusion as can be seen in this patch. In particular, ecode now needs to be set before TDB_LOG anyway, and having it exposed in the header is useless (the struct tdb_context isn't defined, so it's doubly useless). Also, we should never set errno, as io.c was doing. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb: TDB_TRACE support (for developers)Rusty Russell2009-10-227-55/+402
| | | | | | | | | | | | | When TDB_TRACE is defined (in tdb_private.h), verbose tracing of tdb operations is enabled. This can be replayed using "replay_trace" from http://ccan.ozlabs.org/info/tdb. The majority of this patch comes from moving internal functions to _<funcname> to avoid double-tracing. There should be no additional overhead for the normal (!TDB_TRACE) case. Note that the verbose traces compress really well with rzip. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s4-ldb: allow for non-null terminated ldb_val in ldb_dn_from_ldb_valAndrew Tridgell2009-10-211-1/+1
| | | | The strlen() could go past the end of a non-null terminated value
* s4:dsdb Add note explaining about the partition format upgradeAndrew Bartlett2009-10-211-0/+21
|
* 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:ldb_map Fix use-after-free of memory in ldb_mapAndrew Bartlett2009-10-212-4/+8
| | | | | | | | We need to keep the old 'ares' from the remote server around so we can forward it back to the caller. We can't send the same controls (from the last search entry) twice (and it makes no sense anyway). Andrew Bartlett
* s4:dsdb talloc_steal the backend module to under the partitionAndrew Bartlett2009-10-211-0/+1
|
* s4:ldb Put ltdb_private under the 'module'Andrew Bartlett2009-10-211-0/+1
| | | | | | | This helps track the memory better, as we can then place it under the partition hirarchy. Andrew Bartlett
* s4:rpc_server Ensure we talloc_free handles when we delete objectsAndrew Bartlett2009-10-211-0/+3
| | | | | | | If we don't talloc_free the handle, we leak the memory onto the long-term context. Andrew Bartlett
* 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:ldb Add new function to create a cut down list of controlsAndrew Bartlett2009-10-212-0/+47
| | | | | | This I hope will be useful for removing controls from the ldb_reply Andrew Bartlett
* s4:samr Don't leak the whole user onto the long-term handleAndrew Bartlett2009-10-211-2/+2
| | | | | | | The user entry is only required for this function, so use mem_ctx to hold it. Andrew Bartlett
* librpc Make talloc tree in binding tower match the floorsAndrew Bartlett2009-10-211-10/+14
| | | | | | | | | This is mostly cosmetics, but helped me see that these are legitimate stuctures when viewed in the talloc tree. Also don't put the 'ndr' structure on the long-term tree. Andrew Bartlett
* s4:epmapper Create a proper talloc tree of endpoint floorsAndrew Bartlett2009-10-211-1/+1
| | | | 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:provision Use schema to casefold partitions on 'upgrade'.Andrew Bartlett2009-10-211-8/+20
| | | | | | | This helps us upgrade from sam.ldb files before the dynamic partitions work, and ensures we use the right casefolding functions. 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:ldb Add function to add controls to an LDB replyAndrew Bartlett2009-10-212-0/+45
|
* 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:provision Test ability to set GUIDs from provision command lineAndrew Bartlett2009-10-211-0/+1
|
* s4:provison Allow the NTDS guid on the command line (for testing)Andrew Bartlett2009-10-211-0/+3
| | | | | | This allows a blackbox test to confirm this can be set. 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:Handle reprovision with existing partitionsAndrew Bartlett2009-10-211-3/+20
| | | | | | | | The issue here is that if we don't put the partitions metadata in the database before we wipe it, we won't wipe the partitions contents, and so the provision will later fail (entry already exists) 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:provision Set @OPTIONS in the provision_init.ldifAndrew Bartlett2009-10-213-6/+3
| | | | | | | The new partitions code knows to copy these items in when creating a new parition, so we can set it from the start. Andrew Bartlett
* s4:dsdb Rework modules create new partitions at runtimeAndrew Bartlett2009-10-2110-327/+850
| | | | | | | | | | | | | | 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-213-9/+331
| | | | | | 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/drs(tort): Comment typos fixed in drs_util.cKamen Mazdrashki2009-10-211-2/+2
|
* s4/drs(tort): fixed '==' to '>='Kamen Mazdrashki2009-10-211-1/+1
| | | | | ATTID is marked as partial by adding 32768. Thus the check should be '>= 32768'
* s4-lsa: Fix dcesrv_lsa_EnumTrustDom() and avoid infite windows client loop.Günther Deschner2009-10-211-0/+9
| | | | | | Found by RPC-LSA-TRUSTED-DOMAIN torture test. Guenther
* s3-lsa: Fix _lsa_EnumTrustDom() and avoid infite windows client loop.Günther Deschner2009-10-211-0/+9
| | | | | | Found by RPC-LSA-TRUSTED-DOMAIN torture test. Guenther
* s4-smbtorture: test whether an lsa_EnumTrustDom implementation would hang up ↵Günther Deschner2009-10-211-6/+45
| | | | | | a client. Guenther
* s3-lsa: make s3 pass against RPC-LSA-LOOKUPNAMES again.Günther Deschner2009-10-211-6/+7
| | | | | | Do what W2k8 does and return the builtin domain for a NULL name. Guenther
* nsswitch: fix the build of the winbind krb5 locator plugin.Günther Deschner2009-10-211-1/+1
| | | | Guenther