summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_msg.c
AgeCommit message (Collapse)AuthorFilesLines
2010-03-08LDB:common - Change counters to "unsigned" where appropriateMatthias Dieter Wallnöfer1-9/+11
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>
2010-02-14s4-ldb: use TYPESAFE_QSORT() in the rest of the ldb codeAndrew Tridgell1-2/+2
2010-01-13s4:ldb_msg: first try to decode integers as signed and then fallback to unsignedStefan Metzmacher1-0/+18
LDAP only knowns about signed integers, so let ldb_msg_find_attr_as_uint() and ldb_msg_find_attr_as_uint64() cope with it. metze
2010-01-13s4:ldb: be more strict in parsing ldb time stringsStefan Metzmacher1-4/+4
metze
2010-01-02s4-ldb: added ldb_val_to_time() Andrew Tridgell1-0/+27
This is intended as a replacement for ldb_string_to_time() for ldb_val inputs. This ensures it is length limited and includes additional validity checks
2009-11-30s4-ldb: changed ldb_msg_add_dn() to ldb_msg_add_linearized_dn()Crístian Deives1-3/+4
this makes the usage clearer Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-20s4-ldb: added a warning about ldb_msg_add_dnAndrew Tridgell1-0/+2
ldb_msg_add_dn does not copy the dn linearized string
2009-11-20added new function "ldb_msg_add_dn"Crístian Deives1-0/+9
a helper function to a DN element to an ldb_msg using ldb_msg_add_string. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-12s4:ldb Allow ldb_msg_canonicalize to handle empty elementsAndrew Bartlett1-1/+1
(These are deliberately there in DRS replication). Andrew Bartlett
2009-10-22s4-ldb: fast path for equal pointersAndrew Tridgell1-1/+1
We compare identical ldb_val values surprisingly often
2009-10-18s4:ldb_msg_check_string_attribute - add a comment about the result valuesMatthias Dieter Wallnöfer1-1/+5
2009-10-18Revert "s4:ldb_msg - Use LDB constants on results"Matthias Dieter Wallnöfer1-3/+4
This reverts commit 56a8baff3df6a5120b6c7bbca771dfb7c6934fd5. Simo pointed out that I was wrong here.
2009-10-18s4:ldb_msg - Use LDB constants on resultsMatthias Dieter Wallnöfer1-5/+7
2009-10-01s4:ldb_msg_diff - Fixes up possible memory leaks and the python binding of itMatthias Dieter Wallnöfer1-3/+9
2009-09-11s4-ldb: don't remove a message element beyond the end of the arrayAndrew Tridgell1-0/+4
2009-06-29ldb: Properly handle NULL when copying attr lists.Andrew Kroeger1-4/+4
When copying an attribute list, ensure the list itself is not NULL before attempting to access elements of the list.
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-08-21Don't walk past the end of ldb values.Andrew Bartlett1-3/+3
This is a partial fix towards bugs due to us walking past the end of what we think are strings in ldb. There is much more work to do in this area. Andrew Bartlett (This used to be commit 5805a9a8f35fd90fa4f718f73534817fa3bbdfd2)
2007-12-21r26529: Indeed, this belongs in the schema module. Ranged results need to useAndrew Bartlett1-5/+0
an attribute with ';' in the name. Andrew Bartlett (This used to be commit f4023b176eabfb3282fe9b999eac8db55a095ab0)
2007-12-21r25857: IndentAndrew Bartlett1-1/+2
(This used to be commit f42690a90c2f76e7fc130ebbdbd0f93fefacfad6)
2007-10-10r23993: Attempt to fix bug #4808, reported by mwallnoefer@yahoo.de. The issueAndrew Bartlett1-1/+4
is that when we all ldb_msg_add_empty(), we might realloc() the msg->elements array. We need to ensure the source pointer (when copying an element from the same msg) is still valid, or the data copied. Andrew Bartlett (This used to be commit 0fbea30577233d00e7c6cdd4faaece0f99fc57b1)
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-10r23560: - Activate metze's schema modules (from metze's schema-loading-13 ↵Andrew Bartlett1-2/+10
patch). - samba3sam.js: rework the samba3sam test to not use objectCategory, as it's has special rules (dnsName a simple match) - ldap.js: Test the ordering of the objectClass attributes for the baseDN - schema_init.c: Load the mayContain and mustContain (and system...) attributes when reading the schema from ldb - To make the schema load not suck in terms of performance, write the schema into a static global variable - ldif_handlers.c: Match objectCategory for equality and canonicolisation based on the loaded schema, not simple tring manipuation - ldb_msg.c: don't duplicate attributes when adding attributes to a list - kludge_acl.c: return allowedAttributesEffective based on schema results and privilages Andrew Bartlett (This used to be commit dcff83ebe463bc7391841f55856d7915c204d000)
2007-10-10r22681: Fix standalone ldb build when parent directory name != ldb.Jelmer Vernooij1-2/+1
(This used to be commit 1093875d59f1ea9b8bd82277d4f9d8366e584952)
2007-10-10r20731: we need the complex memmove() handling for removing an attribute ↵Stefan Metzmacher1-16/+12
only in one place metze (This used to be commit dfdfdd6cefeac2974a4b3425a49e3dd93ad7e952)
2007-10-10r20462: add functions to handle UTCTime stringsStefan Metzmacher1-3/+56
metze (This used to be commit 49c7da812c290e23bb65b98a2710fb90c4a0ece2)
2007-10-10r20189: remove unused struct elementStefan Metzmacher1-1/+0
metze (This used to be commit d20d1872d5ed1176928b85ef9811c6a5177d0148)
2007-10-10r19909: Make this one double as fastSimo Sorce1-5/+17
(This used to be commit 67b88e49b896f1d783619b8f96554adaeabe80df)
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/+10
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-10r19731: Modify the ldb_map infrustructure to always map from requestedAndrew Bartlett1-1/+13
attributes to backend (remote) attributes. We can't do a reverse mapping safely where the remote attribute may be a source for multiple local attributes. (We end up with the wrong attributes returned). In doing this, I've modified the samba3sam.js test to be more realistic, and fixed some failures in the handling of primaryGroupID. I've added a new (private) helper function ldb_msg_remove_element() to avoid a double lookup of the element name. I've also re-formatted many of the function headers, to fit into standard editor widths. Andrew Bartlett (This used to be commit 186766e3095e71ba716c69e681592e217a3bc420)
2007-10-10r19490: better to check the return resultSimo Sorce1-4/+5
(This used to be commit abdc4edbb8f8b8234bad1be05fa92b3f3bc8876c)
2007-10-10r19489: Change ldb_msg_add_value and ldb_msg_add_empty to take a foruth ↵Simo Sorce1-10/+21
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-10r19188: merge from samba3:Stefan Metzmacher1-1/+1
fix compiler warnings metze (This used to be commit dc139d8715f58b27363266f1426da451907845eb)
2007-10-10r18910: Change ldb_msg_add_string() to not actually add an attribute if theAndrew Tridgell1-0/+5
string is zero length. This allows callers to not have to worry about creating an invalid ldap attribute. See extensive discussion on samba-technical list :-) (This used to be commit 7a1db8c2a432b9ab59b29ee1bfce6c8fe8e981a2)
2007-10-10r18881: remove wrong check and statement.Simo Sorce1-5/+0
to manipulate rootDSE we use ldb_dn_new() as base and that has 0 elements. (This used to be commit 3e131177dae3536c07632fe09e7ebe877bcd9332)
2007-10-10r17859: Fix some return valuesSimo Sorce1-15/+15
(This used to be commit 5b4fc48c49bada2711e356c557ba5f45e34396f6)
2007-10-10r17714: fix compiler warningsStefan Metzmacher1-2/+2
metze (This used to be commit cea06e105a28e12989cd6fdf6d91d86347b8ffc4)
2007-10-10r17580: Add a new tools to convert back from AD-like schema to OpenLDAP.Andrew Bartlett1-0/+17
Add attribute syntax mapping to the existing OpenLDAP -> AD tool. Andrew Bartlett (This used to be commit ba1c652bae700a82acde166e70035d61c320e233)
2007-10-10r17516: Change helper function names to make more clear what they are meant ↵Simo Sorce1-21/+21
to do (This used to be commit ad75cf869550af66119d0293503024d41d834e02)
2007-10-10r17514: Simplify the way to set ldb errors and add anotherSimo Sorce1-5/+5
helper function to set them. (This used to be commit 260868bae56194fcb98d55afc22fc66d96a303df)
2007-10-10r17503: Add a useful function to search for a DNSimo Sorce1-0/+13
(This used to be commit 8c6efd7b55e4ad45e1bd10519a1b91285a4e0347)
2007-10-10r17301: Add a new function to copy a list of attributes, while adding one toAndrew Bartlett1-0/+22
the end. Andrew Bartlett (This used to be commit 2a87ed1111f4ed72798372d6005a88a929c39de6)
2007-10-10r16825: Make ldb_sainity_check() set an error string. This makes it muchAndrew Bartlett1-2/+9
easier to chase down what modules or application code gets wrong. Ensure not to leave memory allocated on failure in ldb_search() Andrew Bartlett (This used to be commit 0828739951ed879640f8ed6e4700d8ca6b8221b8)
2007-10-10r15761: Fix-as-you-go ...Simo Sorce1-1/+1
Testing various async paths and uncovering bugs (This used to be commit 099d873ea596ece18efe63b06bc64e7f97a96f82)
2007-10-10r15582: Commit some forgotten stuff that have been setting on my private ↵Simo Sorce1-0/+17
tree fro long (This used to be commit 7c050b541e98cd442a0c9ed0ddadb3e573cd1304)
2007-10-10r13803: fixed two errors found with 'make valgrindtest'Andrew Tridgell1-1/+1
(This used to be commit 4257fd91ceca34dd868a9168efc28b6cb63f0357)
2007-10-10r13616: Add new ldb functions: ldb_msg_add_steal_string() andAndrew Bartlett1-0/+32
ldb_msg_add_steal_value(). These try to maintain the talloc heirachy, which must be correct otherwise talloc_steal operations of entire attribute lists fails. This fixes the currentTime value, found by using Microsoft's dcdiag tool (before this commit, it pointed to invalid memory, due to the changes in -r 13606) Andrew Bartlett (This used to be commit 424df1bb369fddcfd358cf26dd0da9d3851d181e)