summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_ldif.c
AgeCommit message (Collapse)AuthorFilesLines
2010-07-29s4-ldb: use TALLOC_CTX type instead of 'void'Kamen Mazdrashki1-3/+3
2010-03-08LDB:common - Change counters to "unsigned" where appropriateMatthias Dieter Wallnöfer1-1/+1
To count LDB objects use variables of type "unsigned (int)" or "long long int" on binary or downto searches. To count characters in strings use "size_t". To calculate differences between pointers use "ptrdiff_t".
2010-02-22LDB related spelling fixes.Brad Hards1-1/+1
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2009-12-05s4-ldif: Fix memory leek in ldb_ldif_write()Kamen Mazdrashki1-0/+2
2009-09-21s4-ldb: fixed O(n^2) string handling in ldif debug printAndrew Tridgell1-3/+3
2009-09-08s4/ldb: don't line wrap ldif when --show-binary is usedAndrew Tridgell1-4/+9
2009-09-08s4/ldb: added --show-binary command line optionAndrew Tridgell1-2/+6
This add --show-binary to ldbsearch. When this flag is set, binary blobs will be shown as-is, instead of base64 encoded. This is useful for some XML encoded attributes, and will also be used as part of some NDR print formatting for attributes like repsTo.
2009-09-02added ldb_ldif_message_string()Andrew Tridgell1-0/+16
This function provides a easy function for displaying a ldb_message structure in a human readable format. It is especially useful for calling in gdb.
2009-08-26s4:ldb Add ldb_ldif_write_string() and python wrappersAndrew Bartlett1-0/+40
This allows us to turn a python LdbMessage back into a string. Andrew Bartlett
2009-07-14remove all '\n' from ldb_debugSumit Bose1-6/+6
2009-07-06s4:ldb Fix talloc hirarchy in LDIF parsing codeAndrew Bartlett1-3/+3
The problem here was that some parts of the ldb_message were still attached to the ldb_ldif structure, and when only the message was taken (and the ldif free'ed to reclaim memory) we refereced free'ed memory. Andrew Bartlett
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-17s4:ldb: use try to print the extended dn in the ldif outputAndrew Bartlett1-2/+4
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>
2008-11-17Print unconvertable ldb element values as base64.Andrew Bartlett1-2/+4
If an LDB element cannot be converted into a printable form, we should still print it, just with safety applied. Andrew Bartlett
2008-11-04Use ldb_dn_from_ldb_val to avoid possible over-run of the value.Andrew Bartlett1-2/+2
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
2007-10-10r23798: updated old Temple Place FSF addresses to new URLAndrew Tridgell1-2/+1
(This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb)
2007-10-10r23795: more v2->v3 conversionAndrew Tridgell1-1/+1
(This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac)
2007-10-10r22681: Fix standalone ldb build when parent directory name != ldb.Jelmer Vernooij1-2/+1
(This used to be commit 1093875d59f1ea9b8bd82277d4f9d8366e584952)
2007-10-10r20189: remove unused struct elementStefan Metzmacher1-2/+0
metze (This used to be commit d20d1872d5ed1176928b85ef9811c6a5177d0148)
2007-10-10r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointerStefan Metzmacher1-7/+7
to a ldb_schema_syntax struct. the default attribute handler is now registered dynamicly as "*" attribute, instead of having its own code path. ldb_schema_attribute's can be added to the ldb_schema given a ldb_schema_syntax struct or the syntax name we may also need to introduce a ldb_schema_matching_rule, and add a pointer to a default ldb_schema_matching_rule in the ldb_schema_syntax. metze (This used to be commit b97b8f5dcbce006f005e53ca79df3330e62f117b)
2007-10-10r19832: better prototypes for the linearization functions:Simo Sorce1-1/+1
- ldb_dn_get_linearized returns a const string - ldb_dn_alloc_linearized allocs astring with the linearized dn (This used to be commit 3929c086d5d0b3f08b1c4f2f3f9602c3f4a9a4bd)
2007-10-10r19831: Big ldb_dn optimization and interfaces enhancement patchSimo Sorce1-2/+2
This patch changes a lot of the code in ldb_dn.c, and also removes and add a number of manipulation functions around. The aim is to avoid validating a dn if not necessary as the validation code is necessarily slow. This is mainly to speed up internal operations where input is not user generated and so we can assume the DNs need no validation. The code is designed to keep the data as a string if possible. The code is not yet 100% perfect, but pass all the tests so far. A memleak is certainly present, I'll work on that next. Simo. (This used to be commit a580c871d3784602a9cce32d33419e63c8236e63)
2007-10-10r19489: Change ldb_msg_add_value and ldb_msg_add_empty to take a foruth ↵Simo Sorce1-1/+1
argument. This is a pointer to an element pointer. If it is not null it will be filled with the pointer of the manipulated element. Will avoid double searches on the elements list in some cases. (This used to be commit 0fa5d4bc225b83e9f63ac6d75bffc4c08eb6b620)
2007-10-10r19323: fixed a leak in the ldif parse codeAndrew Tridgell1-0/+1
(This used to be commit 06387e1cf2d12a74e15a6cdf19e83a28c75cb5fd)
2007-10-10r19305: Potential memleak on the ldb_context if we don't use a temp mem contextSimo Sorce1-1/+10
(This used to be commit c989dfbe18a2f700e952f478e258bd626c9eb2f5)
2007-10-10r19188: merge from samba3:Stefan Metzmacher1-4/+7
fix compiler warnings metze (This used to be commit dc139d8715f58b27363266f1426da451907845eb)
2007-10-10r18536: fixed the loading of external binary files from ldif into ldbAndrew Tridgell1-1/+7
(This used to be commit fbe13ed83e2f3508db6d77f4bd65a913ef12ff02)
2007-10-10r18130: the move to system/ in libreplace broke some things ... should beAndrew Tridgell1-0/+1
happier now (This used to be commit 18542f184f75074e56a9793a9e3b6c6d747bb9e6)
2007-10-10r13324: From now on check attribute names obey rfc2251Simo Sorce1-35/+1
Also add a way to provide utf8 compliant functions by registering them with ldb_set_utf8_fns() Next comes code to register samba internal utf8 functions. Simo. (This used to be commit ac9b8a41ffca8e06c5e849d544d3203a665b8e0d)
2007-10-10r12829: fix ldb headers, to not include '<...>' files in .c filesStefan Metzmacher1-6/+1
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later. metze (This used to be commit 380938e97f31c7860aed1e73cc0110c6e17b472e)
2007-10-10r10913: This patch isn't as big as it looks ...Andrew Tridgell1-7/+7
most of the changes are fixes to make all the ldb code compile without warnings on gcc4. Unfortunately That required a lot of casts :-( I have also added the start of an 'operational' module, which will replace the timestamp module, plus add support for some other operational attributes In ldb_msg_*() I added some new utility functions to make the operational module sane, and remove the 'ldb' argument from the ldb_msg_add_*() functions. That argument was only needed back in the early days of ldb when we didn't use the hierarchical talloc and thus needed a place to get the allocation function from. Now its just a pain to pass around everywhere. Also added a ldb_debug_set() function that calls ldb_debug() plus sets the result using ldb_set_errstring(). That saves on some awkward coding in a few places. (This used to be commit f6818daecca95760c12f79fd307770cbe3346f57)
2007-10-10r10303: check no attribute is given emptySimo Sorce1-0/+5
(This used to be commit f0ad9495e45ee0d41ef8ca182984599c8e11cabb)
2007-10-10r9771: - Prevent ldb crash when a invalid DN is addedJelmer Vernooij1-0/+6
- Don't silently drop records with empty attributes tridge/simo: Could you please verify this patch is correct? (This used to be commit 505c9b1d3d39475da141d3b3c156a7e5ba06790c)
2007-10-10r9671: patch from Kai Blin fixing a bug in our base64 encoderAndrew Tridgell1-3/+4
(This used to be commit efa143cb3b4815fed7b037e05d591eadb828536b)
2007-10-10r9391: Convert all the code to use struct ldb_dn to ohandle ldap like ↵Simo Sorce1-2/+2
distinguished names Provide more functions to handle DNs in this form (This used to be commit 692e35b7797e39533dd2a1c4b63d9da30f1eb5ba)
2007-10-10r8342: allow ldb_ldif_read_string() to continue in the string, so you canAndrew Tridgell1-3/+6
read multiple records (This used to be commit 4b11c00421b5152fd7d4be0be0db983bb310021d)
2007-10-10r8082: large rewite of ldb_dn.cSimo Sorce1-3/+3
- we do not support multpiple attribute components anymore, makes code a lot easier they will be readded later if we found out they are really used, so far my tests show w2k3 do not handle them as well - fix escaping issues, move component value to be in an ldb_val structure still need to handle binary values case - make cononicalize functions leak less memory by giving a specific memory context - fix tests scripts so that test-ldap can start - make test not delete databases on completion so that I can inspect them (This used to be commit 624a73148d125690ce18515f19231d26df207738)
2007-10-10r8037: a fairly major update to the internals of ldb. Changes are:Andrew Tridgell1-69/+9
- moved the knowledge of attribute types out of ldb_tdb and into the generic ldb code. This allows the ldb_match() message match logic to be generic, so it can be used by other backend - added the generic ability to load attribute handlers, for canonicalisation, compare, ldif read and ldif write. In the future this will be used by the schema module to allow us to correctly obey the attributetype schema elements - added attribute handlers for some of the core ldap attribute types, Integer, DirectoryString, DN, ObjectClass etc - added automatic registration of attribute handlers for well-known attribute names 'cn', 'dc', 'dn', 'ou' and 'objectClass' - converted the objectSid special handlers for Samba to the new system - added more correct handling of indexing in tdb backend based on the attribute canonicalisation function - added generic support for subclasses, moving it out of the tdb backend. This will be used in future by the schema module - fixed several bugs in the dn_explode code. It still needs more work, but doesn't corrupt ldb dbs any more. (This used to be commit 944c5844ab441b96d8e5d7b2d151982139d1fab9)
2007-10-10r7808: fixed the build of ldb after the binary file support in ldif was addedAndrew Tridgell1-1/+3
(This used to be commit 0a8c722c8017e20635223b2c5dfc58759478312c)
2007-10-10r7805: add support to read binary files into attributes data like ldap tools ↵Simo Sorce1-3/+73
does (This used to be commit 38a14396262eeb279d67c2f0da06bfa0706a3be4)
2007-10-10r7804: added the samba specific ldif handlers into the tree, but don't enableAndrew Tridgell1-2/+26
them just yet. I have tested them, and they work fine, but enabling them will break code in rpc_server/ and samdb, so we need to fix that first (This used to be commit 07d459406b4c63e49141e0e533e1274b4052abf9)
2007-10-10r7803: added support in ldb for callers to setup ldif read/write functions,Andrew Tridgell1-10/+69
so that ldbedit, ldbsearch etc can display nice human readable ldif, while storing the data as binary blobs. This will be used for storing NDR encoded objectSid and similar attributes, while making the command line interface sane (This used to be commit 37e283089a846fc0608fef3981a3447300e33728)
2007-10-10r7740: get rid of our duplicate base64 routinesAndrew Tridgell1-4/+4
(This used to be commit cf17f90a83cf04815544c5408eb56d00546b3e88)
2007-10-10r7739: fixed an off by one bug in the base64 decoder for ldb ldifAndrew Tridgell1-0/+3
(This used to be commit fe2b77af2352f1964402a4286105916e990dc36f)
2007-10-10r4714: move the ldb code to the new talloc interface (eg remove _p suffix)Simo Sorce1-8/+8
this helps standalone building of ldb renew the schema module split code into functions to improve readability and code reuse add and modify works correctly but we need a proper testsuite Simo (This used to be commit a681ae365ff1b5a2771b42ebd90336651ce1e513)
2007-10-10r4474: - converted ldb to use talloc internallyAndrew Tridgell1-27/+25
- added gcov flags to Makefile.ldb - expanded ldb test suite to get more coverage (This used to be commit 0ab98f50a7e0fe15347a99e5c29a6590a87729a0)
2007-10-10r4010: fixed parsing of null attributes in the ldb ldif parserAndrew Tridgell1-2/+6
(This used to be commit b4fd76f78eadd8648ceed508766235e80702aa8f)
2007-10-10r3783: - don't use make proto for ldb anymoreStefan Metzmacher1-0/+2
- split ldh.h out of samba's includes.h - make ldb_context and ldb_module private to the subsystem - use ltdb_ prefix for all ldb_tdb functions metze (This used to be commit f5ee40d6ce8224e280070975efc9911558fe675c)
2007-10-10r3449: more include file reductionAndrew Tridgell1-0/+1
the ldb part isn't ideal, I will have to think of a better solution (This used to be commit 6b1f86aea8427a8e957b1aeb0ec2f507297f07cb)
2007-10-10r2055: Add PRINTF_ATTRIBUTE to many more parts of the code, and a newAndrew Bartlett1-0/+2
--enable-developer warning for when they are missing. Andrew Bartlett (This used to be commit 8115e44d47bcd65edba08d10117180ae508cdbc1)