Age | Commit message (Collapse) | Author | Files | Lines |
|
It just adds another element, nothing more.
Caller is responsible to fill-in the added element and
determine how to handle data allocation contexts.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
from client
Old implementation from ldb_msg_diff() was moved into
this this function but with changed interface
so that a memory context may be passed.
ldb_msg_diff() function is now based on ldb_msg_difference(),
which fixes a hidden leak - internal ldb_msg object
(returned from ldb_msg_canonicalize) wasn't freed
and stays attached to ldb_context for the connection lifetime.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
We can have some special (bad) messages which contain multiple message elements
for the same attribute. The AD password change ones are such an example.
|
|
|
|
with length 0
|
|
|
|
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".
|
|
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
|
|
|
|
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
|
|
metze
|
|
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
|
|
this makes the usage clearer
Signed-off-by: Andrew Tridgell <tridge@samba.org>
|
|
ldb_msg_add_dn does not copy the dn linearized string
|
|
a helper function to a DN element to an ldb_msg using ldb_msg_add_string.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
|
|
(These are deliberately there in DRS replication).
Andrew Bartlett
|
|
We compare identical ldb_val values surprisingly often
|
|
|
|
This reverts commit 56a8baff3df6a5120b6c7bbca771dfb7c6934fd5.
Simo pointed out that I was wrong here.
|
|
|
|
|
|
|
|
When copying an attribute list, ensure the list itself is not NULL before
attempting to access elements of the list.
|
|
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.
|
|
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)
|
|
an attribute with ';' in the name.
Andrew Bartlett
(This used to be commit f4023b176eabfb3282fe9b999eac8db55a095ab0)
|
|
(This used to be commit f42690a90c2f76e7fc130ebbdbd0f93fefacfad6)
|
|
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)
|
|
(This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb)
|
|
(This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac)
|
|
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)
|
|
(This used to be commit 1093875d59f1ea9b8bd82277d4f9d8366e584952)
|
|
only in one place
metze
(This used to be commit dfdfdd6cefeac2974a4b3425a49e3dd93ad7e952)
|
|
metze
(This used to be commit 49c7da812c290e23bb65b98a2710fb90c4a0ece2)
|
|
metze
(This used to be commit d20d1872d5ed1176928b85ef9811c6a5177d0148)
|
|
(This used to be commit 67b88e49b896f1d783619b8f96554adaeabe80df)
|
|
- ldb_dn_get_linearized
returns a const string
- ldb_dn_alloc_linearized
allocs astring with the linearized dn
(This used to be commit 3929c086d5d0b3f08b1c4f2f3f9602c3f4a9a4bd)
|
|
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)
|
|
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)
|
|
(This used to be commit abdc4edbb8f8b8234bad1be05fa92b3f3bc8876c)
|
|
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)
|
|
fix compiler warnings
metze
(This used to be commit dc139d8715f58b27363266f1426da451907845eb)
|
|
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)
|
|
to manipulate rootDSE we use ldb_dn_new() as base and that has 0 elements.
(This used to be commit 3e131177dae3536c07632fe09e7ebe877bcd9332)
|
|
(This used to be commit 5b4fc48c49bada2711e356c557ba5f45e34396f6)
|
|
metze
(This used to be commit cea06e105a28e12989cd6fdf6d91d86347b8ffc4)
|
|
Add attribute syntax mapping to the existing OpenLDAP -> AD tool.
Andrew Bartlett
(This used to be commit ba1c652bae700a82acde166e70035d61c320e233)
|
|
to do
(This used to be commit ad75cf869550af66119d0293503024d41d834e02)
|
|
helper function to set them.
(This used to be commit 260868bae56194fcb98d55afc22fc66d96a303df)
|