summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules/ldb_map_outbound.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r20459: LDB map cleanup:Andrew Bartlett1-16/+17
- Replace 'return 0' with return LDB_SUCCESS in more places. - Do not return NULL attribute values, these are not permitted. Instead, fail the whole conversion. - Cleanup old comments. Andrew Bartlett (This used to be commit f28cf842dab2fe5e691d755f28c6048c986e284f)
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-10r19733: More work to fix ldb_map. With the wildcard present,Andrew Bartlett1-6/+2
map_attr_find_local() always returns, which is exactly what we don't want. Instead, rely on the overwrite behaviour. Andrew Bartlett (This used to be commit 9b9b7bae16a635d9a9ba72d21a4a4718d294c9b0)
2007-10-10r19731: Modify the ldb_map infrustructure to always map from requestedAndrew Bartlett1-42/+172
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-10r19531: Make struct ldb_dn opaque and local to ldb_dn.cSimo Sorce1-5/+5
(This used to be commit 889fb983ba1cf8a11424a8b3dc3a5ef76e780082)
2007-10-10r19521: Fix memory leak.Andrew Bartlett1-0/+1
Andrew Bartlett (This used to be commit cf1b0cc19fc7aad2a44777929861e70497ccef7d)
2007-10-10r19489: Change ldb_msg_add_value and ldb_msg_add_empty to take a foruth ↵Simo Sorce1-6/+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-10r19370: Handle errors if talloc_reference failsSimo Sorce1-2/+7
(This used to be commit 05134a90e3ff0e4039dbd34c52f824bc666feb11)
2007-10-10r19312: This should fix a nasty bug with values and names being freed before ↵Simo Sorce1-1/+5
the results where used. Seem that el is hanging out of a request, and the target is put on the final results. Still one to catch and fix, but this seem to cure most of them (This used to be commit bfeaa08fde805439dbda974be6fcb692957b00f1)
2007-10-10r18504: Handle mappings for RENAME and KEEP attributes better. We don't needAndrew Bartlett1-44/+66
to mess with the values in these cases. Where we do convert the values, try and convert substrings. This isn't going to be perfect, but we should try rather than segfault. This also avoids using the wrong arm of the union for the attribute name The change in the entryUUID module is to correct the case of sAMAccountName, due to the case sensitive ldap.js test. Andrew Bartlett (This used to be commit 81d9a692c1e74ec9078bf718003eafdba85b4324)
2007-10-10r18495: More work on the LDAP backend (which now passes a lot of our tests!)Andrew Bartlett1-32/+32
This adds a list of attributes that are in our wildcard seaches, but the remote server requires to be explicitly listed. This also cleans up the handling of wildcards in ldb_map to be more consistant. Also fix the partitions module to rebase the search, if on the GC port, we do a subtree search. (Otherwise backends can rightly complain that the search is not in their scope). Andrew Bartlett (This used to be commit bc58792b7102f086b19353635d5d5ef9d40a0aae)
2007-10-10r18321: fixed some warnings on AIXAndrew Tridgell1-2/+2
(This used to be commit 449fab2c264aa50601f9a2d3310f1910ba97706b)
2007-10-10r18301: I discovered how to load the warnings from a build farm build intoAndrew Tridgell1-2/+2
emacs compile mode (hint, paste to a file, and compile as "cat filename"). This allowed me to fix nearly all the warnings for a IA_64 SuSE build very quickly. (This used to be commit eba6c84efff735bb0ca941ac4b755ce2b0591667)
2007-10-10r17542: In using ldb_map, I ran across some very odd behaviours when we searchAndrew Bartlett1-4/+3
for objectClass=xyz. The code has been warning at me 'no covert_operator set', and indeed this is the case. (It then proceeds to strip this as a search expression) In this commit, I have implemented a convert_operator for objectClass, by pretending it is a simple MAP_CONVERT operator for the search requests. I also have changed the logic for when we should bail out. I can only see reason to bail out on the search if we have both local and remote trees. How can a remote-only search be un-splittable? Andrew Bartlett (This used to be commit 656e58672c357121647a080400fcab4e5d30b46b)
2007-10-10r17525: This is a merge from the Google Summer of Code 2006 project by ↵Andrew Bartlett1-0/+1134
Martin Kühl <mkhl@samba.org>. Martin took over the work done last year by Jelmer, in last year's SoC. This was a substanital task, as the the ldb modules API changed significantly during the past year, with the addition of async calls. This changeset reimplements and enables the ldb_map ldb module and adapts the example module and test case, both named samba3sam, to the implementation. The ldb_map module supports splitting an ldb database into two parts (called the "local" and "remote" part) and storing the data in one of them (the remote database) in a different format while the other acts as a fallback. This allows ldb to e.g. store to and load data from a remote LDAP server and present it according to the Samba4 schema while still allowing the LDAP to present and modify its data separately. A complex example of this is the samba3sam module (by Jelmer Vernooij), which maps data between the samba3 and samba4 schemas. A simpler example is given by the entryUUID module (by Andrew Bartlett), which handles some of the differences between AD and OpenLDAP in operational attributes. It principally maps objectGUID, to and from entryUUID elements. This is also an example of a module that doesn't use the local backend as fallback storage. This merge also splits the ldb_map.c file into smaller, more manageable parts. (This used to be commit af2bece4d343a9f787b2e3628848b266cec2b9f0)