summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r21496: A number of ldb control and LDAP changes, surrounding theAndrew Bartlett3-3/+3
'phantom_root' flag in the search_options control - Add in support for LDB controls to the js layer - Test the behaviour - Implement support for the 'phantom_root' flag in the partitions module - Make the LDAP server set the 'phantom_root' flag in the search_options control - This replaces the global_catalog flag passed down as an opaque pointer - Rework the string-format control parsing function into ldb_parse_control_strings(), returning errors by ldb_errorstring() method, rather than with printf to stderr - Rework some of the ldb_control handling logic Andrew Bartlett (This used to be commit 2b3df7f38d7790358dbb4de1b8609bf794a351fb)
2007-10-10r21354: fix commentStefan Metzmacher1-1/+1
metze (This used to be commit 545f769c2fb29323f2fa06e076af894c0be678d0)
2007-10-10r21305: Change the skel module a little, so make it names clearer.Andrew Bartlett1-6/+7
Andrew Bartlett (This used to be commit 26758fc24ca0b28e1ed07cc20801175e94362d57)
2007-10-10r20772: fix segfault caused by ldb_set_default_dns() from init_context hook ↵Stefan Metzmacher1-0/+3
of the root dse module metze (This used to be commit a201d3fc4ddfa336e2a98412d05eac4e51d01cea)
2007-10-10r20670: Make the logic more clearSimo Sorce1-16/+22
(This used to be commit 906630f18e5fab4be6c40018aafe67df1e27c92e)
2007-10-10r20669: Simplifing moreSimo Sorce1-88/+56
(This used to be commit 03de577059cb71bb6d5df7a65b5f5ba30bdea746)
2007-10-10r20656: This way the process flow should be much more readable.Simo Sorce1-104/+131
We need to make it easier, but this should be a step in the right direction. (This used to be commit ad58177ee46a4f02ee2e2d97882b851226bd3af2)
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-10r20198: let the IBM checker ignore the warning about a missing breakStefan Metzmacher1-1/+2
statement... metze (This used to be commit 6b20123c10b8812759b0876990766adc207bc5b4)
2007-10-10r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointerStefan Metzmacher3-10/+16
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-10r19904: port fies from samba3Simo Sorce1-1/+15
(This used to be commit 49d1559d3670de4a4f9eace99600c37cf039bae2)
2007-10-10r19832: better prototypes for the linearization functions:Simo Sorce4-9/+9
- 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 Sorce5-31/+89
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-10r19743: merge from samba3:Stefan Metzmacher1-488/+0
remove old unused schema module metze (This used to be commit 3c16951b0d88013b34a0213ced79087653713ddf)
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 Bartlett3-51/+186
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 Sorce5-100/+78
(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-10r19507: Merge my DSO fixes branch. Building Samba's libraries as shared ↵Jelmer Vernooij1-2/+2
libraries works again now, by specifying --enable-dso to configure. (This used to be commit 7a01235067a4800b07b8919a6a475954bfb0b04c)
2007-10-10r19489: Change ldb_msg_add_value and ldb_msg_add_empty to take a foruth ↵Simo Sorce5-17/+12
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-10r19452: Warn but don't die if registering against the rootdse is not possibleSimo Sorce3-8/+3
(This used to be commit 4ad2eba2aa7711d480a844766e2dd3da938b3413)
2007-10-10r19370: Handle errors if talloc_reference failsSimo Sorce1-2/+7
(This used to be commit 05134a90e3ff0e4039dbd34c52f824bc666feb11)
2007-10-10r19332: ldb_parse_tree leaksSimo Sorce1-1/+1
(This used to be commit 3e0e2787c1da1c3831e21b163e1370001d725a3d)
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-10r19299: Fix possible memleaksSimo Sorce1-0/+2
(This used to be commit 6fad80bb09113a60689061a2de67711c9924708b)
2007-10-10r19129: Add comment to clarify behaviorSimo Sorce1-0/+4
(This used to be commit 7180f38e9e436ca7a7c49f2d4b315ec5eb9c7631)
2007-10-10r18781: Move the usnCreated and usnChanged handling around again.Andrew Bartlett1-127/+0
This moves these attributes from objectguid into an optional backend (objectguid), used by ltdb. For OpenLDAP, the entryUUID module converts entryCSN into usnChanged. This also changes the sequence number API, and uses 'time based' sequence numbers, when an LDAP or similar backend is detected. To assist this, we also store the last modified time in the TDB, whenever we change a value. Andrew Bartlett (This used to be commit 72858f859483c0c532dddb2c146d6bd7b9be5072)
2007-10-10r18770: Avoid crashes and fix up other issues in the client-side ↵Andrew Bartlett1-27/+57
paged_searches module. In particular, we must query the remote server to find out if paged searches are supported, not the local ldb. This patch also removes the ue of bool, and returns it to LDB error codes. Andrew Bartlett (This used to be commit d36d05858bb9b87802f5ffb83285ef12b9646741)
2007-10-10r18591: Better defaults for share creationSimo Sorce1-6/+13
Fix logic error in paged_results (This used to be commit 34ce1f8e1bab2debb508aa8bf478231389a77d42)
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 Bartlett4-59/+95
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-10r18439: 2nd try at a talloc_move() api. This type with the ** ptr interfaceAndrew Tridgell4-11/+11
exposed. Unfortunately this generates a large number of type punning warnings. We'll have to find some magic to hide those. (This used to be commit 254cbf09dee5a1e20c47e47a298f1a8d172b41b9)
2007-10-10r18438: I should have examined these uses of talloc_move() moreAndrew Tridgell1-5/+3
carefully. Most of them are OK, but a couple were not. (This used to be commit b0de2838829d9750817c31f28c11c6b2be6e7b64)
2007-10-10r18436: converted ldb to use talloc_move() instead of talloc_steal() whenAndrew Tridgell4-35/+13
appropriate. Note that I also removed the error checks that were being done on the result of talloc_steal(). They are pointless as talloc_steal() doesn't have any failure modes that wouldn't cause a segv anyway, and they tend to clutter the code (This used to be commit c0d9e7d473b8e3eb2524a9fc29cf88680f994b36)
2007-10-10r18321: fixed some warnings on AIXAndrew Tridgell2-3/+3
(This used to be commit 449fab2c264aa50601f9a2d3310f1910ba97706b)
2007-10-10r18317: Make sure we actually have a valid reply or failSimo Sorce1-0/+3
(This used to be commit 41cb3a9258012e628a2d87959cc066f6c5d92255)
2007-10-10r18301: I discovered how to load the warnings from a build farm build intoAndrew Tridgell2-3/+3
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-10r17775: use an enum to get rid of compiler warningsStefan Metzmacher1-6/+6
metze (This used to be commit c66cf31afd99d537b1f4dfc8ff1502dfa6accfd3)
2007-10-10r17700: Despite our best hopes, the way module initialisation tends to happen,Andrew Bartlett1-4/+4
we make searches before things are initialised. Cope with this. Andrew Bartlett (This used to be commit daa1a61891ede404bcce72affb7094e5c452c689)
2007-10-10r17698: The original code assumed that &data->context was a valid tallocAndrew Bartlett2-13/+21
pointer. This only works when this is the only structure member, but when I added a new context pointer, it failed. Andrew Bartlett (This used to be commit 5bcfa12cef0d9eba5d5d1f65f676e7852297667f)
2007-10-10r17691: Make the structure more public, so we have somewhere for callingAndrew Bartlett2-5/+6
modules to put private data. Andrew Bartlett (This used to be commit ba00f45357d113bf245c6622ef96701aa7c7026c)
2007-10-10r17614: Our first "client side' ldb module.Simo Sorce1-0/+438
This module has been created with the purpose of being used for searches against ldap servers without the need to handle the control manually You can test it by passing -o modules:paged_searches to ldbsearch The page search size is set to 500 objects. Simo. (This used to be commit 07d377f3c27966b40465bb5dc4f55746ba8489af)
2007-10-10r17596: apply patch from MartinSimo Sorce1-4/+4
(This used to be commit e9d101bc3c1e7c1e8b6560a1f7161e6eb270c7df)
2007-10-10r17579: make ldb build g++ friendlyAndrew Tridgell1-19/+19
(This used to be commit 403cbd335594112e0c58fd68d20f0e3faad7d186)
2007-10-10r17542: In using ldb_map, I ran across some very odd behaviours when we searchAndrew Bartlett4-5/+26
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-10r17526: Move timestamp generation into the objectGUID module. It probablyAndrew Bartlett1-41/+0
needs to be renamed (operation_add?). This allows me to match the behaviour and substitute with the entryUUID module for remote LDAP connections. Andrew Bartlett (This used to be commit af02b4d7c631bb15bf5a5f73f9fdc23075d50f60)
2007-10-10r17525: This is a merge from the Google Summer of Code 2006 project by ↵Andrew Bartlett5-1231/+3044
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)
2007-10-10r17514: Simplify the way to set ldb errors and add anotherSimo Sorce6-31/+32
helper function to set them. (This used to be commit 260868bae56194fcb98d55afc22fc66d96a303df)
2007-10-10r17186: "async" word abuse clean-up part 2Simo Sorce6-82/+82
(This used to be commit c6aa60c7e69abf1f83efc150b1c3ed02751c45fc)
2007-10-10r17185: Oh, I wanted to do this for sooo long time.Simo Sorce6-147/+147
Finally acknowledge that ldb is inherently async and does not have a dual personality anymore Rename all ldb_async_XXX functions to ldb_XXX except for ldb_async_result, it is now ldb_reply to reflect the real function of this structure. Simo. (This used to be commit 25fc7354049d62efeba17681ef1cdd326bc3f2ef)