Age | Commit message (Collapse) | Author | Files | Lines |
|
We need to check the length before the value
|
|
This prevents valgrind errors when we store these blobs in a database
|
|
first list
Intuitively you would think it couldn't be longer than the minimum of
the two lists, but we are deliberately allowing for duplicates at this
level of the indexing code, which means the result can be longer
|
|
This gets rid of the @IDXPTR approach to in-transaction indexing,
instead using an in-memory tdb to hold index values during a
transaction. This also cleans up a lot of the internal indexing logic,
hopefully making it easier to understand.
One of the big changes is in memory management, with a lot more use
made of talloc tricks to avoid copying dn lists, and shortcuts used to
avoid high intersection and union calculation costs.
The overall result is that a re-provision on my laptop goes from 48s
to a bit over 10s.
|
|
|
|
This was inspired by one of mdw's const patches
Andrew Bartlett
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
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
|
|
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
|
|
- Cleans it up from unnecessary "lower()/upper()" and parameters which can be
derived through "lp" calls.
- Substitute the "HOSTNAME" caption in the "smb.conf" templates with
"NETBIOS_NAME" which fits better.
- Now the "realm" and "domain" parameter of the provision are totally case
insensitive and the script itself up/downcases them appropriately depending
on the use (e.g. "realm" upcase for KERBEROS, lowcase for DNS domainname).
|
|
Add libc as explicit dependency where we use "-z defs" linker flags. This is
to silence the Sun linker. Otherwise it whines:
malloc ... (symbol belongs to implicit dependency /lib/libc.so.1)
|
|
|
|
|
|
Renamed the variable "str" in the nested block to "str2" to prevent the collision
with "str" in the main function block.
|
|
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>
|
|
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>
|
|
Also, set logging function so we get more informative messages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
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>
|
|
This means you can kill it at any time and expect no corruption.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
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>
|
|
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>
|
|
The strlen() could go past the end of a non-null terminated value
|
|
|
|
This should make upgrades easier
|
|
The previous code would fail if the caller used tdb:// in the URL for the
top-level database.
Andrew Bartlett
|
|
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
|
|
|
|
This helps track the memory better, as we can then place it under the partition
hirarchy.
Andrew Bartlett
|
|
If we don't talloc_free the handle, we leak the memory onto the long-term
context.
Andrew Bartlett
|
|
This ensures that the partition control, needed here for repl_meta_data's
internal work, is not pushed up to other callers.
Andrew Bartlett
|
|
This I hope will be useful for removing controls from the ldb_reply
Andrew Bartlett
|
|
The user entry is only required for this function, so use
mem_ctx to hold it.
Andrew Bartlett
|
|
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
|
|
Andrew Bartlett
|
|
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
|
|
This helps us upgrade from sam.ldb files before the dynamic partitions
work, and ensures we use the right casefolding functions.
Andrew Bartlett
|
|
This is no longer required, as the instancetype module is now above
repl_meta_data.
Andrew Bartlett
|
|
The problem here has been avoided in repl_meta_data, and so this is no
longer required.
Andrew Bartlett
|
|
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
|
|
|
|
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
|
|
|
|
This allows one instance of LDB to add a partition, and another to use
it without first closing the database.
Andrew Bartlett
|
|
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
|
|
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
|
|
|
|
This allows a blackbox test to confirm this can be set.
Andrew Bartlett
|