Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
This fixes a bug in the ldb.i python wrapper, that showed up under valgrind.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
This allows searches with the extended DN control to still print the
extended DN in ldif output (it would otherwise be parsed and hidden in
the structure).
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Whenever we pass a DN to the LDAP server, we now use
ldb_dn_get_extended_linearized(). This allows us to send the extended
DN if set, and therefore allows searches of the form
'<GUID=aaa45ea0-94cd-45e9-8753-abe455d9a8f1>'.
We actually use the '0' format (GUID=aaa45ea094cd45e98753abe455d9a8f1)
because it is more widely supported (by Win2k in particular).
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
This introduces a new set of pluggable syntax, for use on the
extended DN, and uses them when parsing the DN.
If the DN appears to be in the extended form, we no longer return the
full DN 'as is', but only return the normal part from
ldb_dn_get_linearized().
When validating/parsing the DN we validate not only the format of the
DN, but also the contents of the GUID or SID (to ensure they are
plausable).
We also have functions to set and get the extended components on the DN.
For now, extended_dn_get_linearized() returns a newly constructed and
allocated string each time.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
|
|
ldb indexing can cause huge files, and huge memory usage. This
experiment allows us to keep indexes in memory during a transaction,
then to write the indexes to disk when the transaction completes. The
result is that the db is much smaller (we have seen improvements of
about 100x in file size) and memory usage during large transactions is
also greatly reduced
Note that this patch uses the unusual strategy of putting pointers
into a ldb (and thus into a tdb). This works because the pointers are
only there during a transaction, so the pointers are not exposed to
any other users of the database. The pointers allow us to avoid some
really bad allocation problems with tdb record allocation during the
re-indexing.
|
|
Samba 3 and Samba 4 output.
|
|
re-indexing in ldb is triggered on any modification to the @ATTRIBUTES
or @INDEXLIST records. This happens to produce a worst-case
fragmentation of the database, as all @INDEX records are deleted then
re-created. By repacking after re-indexing we ensure that the database
ends up without extreme fragmentation.
|
|
The command line tools ldbadd, ldbmodify and ldbedit should operate
within a transaction to make them more efficient. The ldbadd tool in
particular is much faster when adding a large number of records if all
the adds happen within a transaction. Previously there was a
transaction per record.
|
|
|
|
(Even if the callback takes some time, this isn't a ldb_tdb timeout
any more)
Andrew Bartlett
|
|
If an LDB element cannot be converted into a printable form, we should
still print it, just with safety applied.
Andrew Bartlett
|
|
|
|
|
|
|
|
The options argument to ldb connect() needs to be marked for the same
special handling as attrs in search
|
|
|
|
The ldb_val is length-limited, and while normally NULL terminated,
this avoids the chance that this particular value might not be, as
well as avoiding a cast.
Andrew Bartlett
|
|
This reverts commit 753af36a3e194f645ec0b68a033199035e71c909.
|
|
The linearized version is not casefolded so length might not match
and yet the strings be equivalent. This can happen if one component
is case-insensitive and a letter that have an uppercase version of
a multibyte character that differ in legth from the corresponding
lowercase one.
|
|
|
|
remove some unused functions.
|
|
|
|
it should always have been. Make it also async so that it is not a special case.
|
|
This attribute is critical for the operation of nearly all the
Microsoft Mangement Console tools
Andrew Bartlett
|
|
|
|
|
|
metze
|
|
|
|
metze
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This commit applies some cosmetic corrections for the LDB library.
|
|
This commit applies some cosmetic corrections for the LDB backend modules.
|
|
is not guaranteed
|
|
|
|
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.
|
|
parameters.
|
|
Add shared-build target to the ldb library, and make it possible to build
it against libtalloc, libevents, libtdb as shared libraries.
|
|
|
|
|
|
|
|
retieve -> retrieve
Karolin
(partialy cherry-picked from 37c64130701ab13b6f34998ac17fec2d128c2e08)
metze
(This used to be commit 4d92e6d582a5b2094b2aaa9008a54b37ccfcc2d7)
|
|
(This used to be commit baddefd0a6fa430af1a3001064149127e0d29361)
|