summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbsearch.c
AgeCommit message (Collapse)AuthorFilesLines
2008-02-20Fix static module list generation for ldb.Jelmer Vernooij1-2/+0
(This used to be commit 92c1c0e9137f0845cac6cc96bf78711b6aaffe21)
2008-01-11Rework ldbsearch to avoid segfault when remote LDAP server returnsAndrew Bartlett1-12/+10
referrals. Andrew Bartlett (This used to be commit 8099facff99dab4de27ea6f857d0e8f5eaa3db5a)
2008-01-11Fix segfault when sorting LDAP replies on the client.Andrew Bartlett1-2/+2
Andrew Bartlett (This used to be commit c72c39326b263b3aacd178ddc2fc3b1a2906f3d3)
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-3/+2
(This used to be commit 1093875d59f1ea9b8bd82277d4f9d8366e584952)
2007-10-10r21496: A number of ldb control and LDAP changes, surrounding theAndrew Bartlett1-2/+5
'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-10r19831: Big ldb_dn optimization and interfaces enhancement patchSimo Sorce1-5/+4
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-10r19332: ldb_parse_tree leaksSimo Sorce1-1/+1
(This used to be commit 3e0e2787c1da1c3831e21b163e1370001d725a3d)
2007-10-10r18439: 2nd try at a talloc_move() api. This type with the ** ptr interfaceAndrew Tridgell1-2/+2
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-10r18436: converted ldb to use talloc_move() instead of talloc_steal() whenAndrew Tridgell1-12/+2
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-10r17830: Set the default_basedn (hey, it comes from the "default" naming ↵Simo Sorce1-1/+1
contex :-) once at connection time, after modules have been loaded. Introduce a function to retrieve the value where needed. (This used to be commit 0caf6a44e03393c645030a9288e7dfd31e97c98b)
2007-10-10r17821: changed ldb_search() and the ldbsearch command line utility toAndrew Tridgell1-0/+4
automatically work out the basedn when basedn==NULL. The basedn is fetched from the rootDSE defaultNamingContext value (if there is one) This means we don't have to have the defaultNamingContext logic in lots of places. It makes a lot of sense to me to have basedn==NULL mean "use the default, as given by the database" Note that explicitly specifing a basedn of '' is not the same thing, and will not trigger this code The baseDN is cached in a ldb opaque, so we only have to fetch it once (This used to be commit 5d1b66b68fc517ce684f75e466ed5f25e46857d5)
2007-10-10r17613: style fixSimo Sorce1-1/+2
(This used to be commit 86fc149ca805e4c801f6251c8c9f2480010b4962)
2007-10-10r17186: "async" word abuse clean-up part 2Simo Sorce1-3/+3
(This used to be commit c6aa60c7e69abf1f83efc150b1c3ed02751c45fc)
2007-10-10r17185: Oh, I wanted to do this for sooo long time.Simo Sorce1-54/+54
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)
2007-10-10r16036: Add a couple of new functions to corretly deal with timeouts.Simo Sorce1-1/+1
Check timeouts are correctly verified. Some minor fixed and removal of unused code. (This used to be commit b52e5d6a0cb1a32e62759eaa49ce3e4cc804cc92)
2007-10-10r15944: rename LDB_ASYNC_ADD -> LDB_ADD, LDB_ASYNC_MODIFY -> LDB_MODIFY, etc...Simo Sorce1-1/+1
(This used to be commit 55d97ef88f377ef1dbf7b1774a15cf9035e2f320)
2007-10-10r15932: Remove per request credsSimo Sorce1-1/+0
They have never benn used and make little sense too imo (This used to be commit f0c1d08d50f8a3e25650ac85b178ec7a43e433d9)
2007-10-10r15847: We probably want to keep the global initSimo Sorce1-0/+2
(This used to be commit 35df457fe61e1b1f0746eadba867f7ac149e9600)
2007-10-10r15846: An async version of ldbsearchSimo Sorce1-59/+186
(This used to be commit 2c1af6556a2d57df6626a9f0d9fd758602ac3c5c)
2007-10-10r15372: Don't look at possibly undefined controls in failure cases.Andrew Bartlett1-3/+0
Andrew Bartlett (This used to be commit 04f383048ae48af6b28052ba6461fe2e476e7c44)
2007-10-10r13998: From now on ldb_request() will require an alloced requestSimo Sorce1-17/+18
By freeing the request you will be sure everything down the path get freed. this also means you have to steal the results if you want to keep them :) simo. (This used to be commit e8075e6a062ce5edb84485e45d0b841c2ee2af7d)
2007-10-10r13786: [merge] Add registration functions for LDB modulesJelmer Vernooij1-1/+3
Applications that use LDB modules will now have to run ldb_global_init() before they can use LDB. The next step will be adding support for loading LDB modules from .so files. This will also allow us to use one LDB without difference between the standalone and the Samba-specific build (This used to be commit 52a235650514039bf8ffee99a784bbc1b6ae6b92)
2007-10-10r13609: Get in the initial work on making ldb asyncSimo Sorce1-2/+10
Currently only ldb_ildap is async, the plan is to first make all backend support the async calls, and then remove the sync functions from backends and keep the only in the API. Modules will need to be transformed along the way. Simo (This used to be commit 1e2c13b2d52de7c534493dd79a2c0596a3e8c1f5)
2007-10-10r13580: fix broken client side sortSimo Sorce1-1/+1
(This used to be commit cbbc0d7cc4f589235d209011bdb0a0401b492d9e)
2007-10-10r13289: Check the tree is not NULLSimo Sorce1-0/+1
Thanks to Aaron J. Seigo <aseigo@kde.org> for spotting this (This used to be commit 4b5c0493e2276a9eba1bada7c4bac99999a465e2)
2007-10-10r13167: handle cotrols' reply even in errorSimo Sorce1-2/+1
(This used to be commit b9d1d02f381cf81883c9f22a1702319f5fce6eb8)
2007-10-10r12989: move the control parsing and handleng functions to cmdline.cSimo Sorce1-315/+1
so that they can be used by the other ldb tools as well (This used to be commit c12b3c5cb46d428f815c623efacff8edebb6f6e3)
2007-10-10r12984: add parse code and ldbsearch cmdline code forStefan Metzmacher1-0/+19
NOTIFICATION LDAP Controls http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ldap/ldap/ldap_server_notification_oid.asp this doesn't work yet, but it shows that we need to extend ldb to correctly handle async requests... metze (This used to be commit 1fe67189490c9faf499b68a28071a6294a53db0e)
2007-10-10r12983: - fix using a DIRSYNC cookie from the command lineStefan Metzmacher1-5/+11
- also w2k doesn't work correct with max_attrs = 0, so we should use a high number, with this I'm getting the same results from w2k and w2k3 metze (This used to be commit ce9f086c3c1a65bf1b4c843ec44e8817d9361182)
2007-10-10r12977: Some code to implement the client side of the Dirsync controlSimo Sorce1-2/+72
Still investigating how it works. Simo. (This used to be commit bebd403523e581606505e05e7cb621efbc22fa36)
2007-10-10r12941: Add Attribute Scoped Search controlSimo Sorce1-0/+4
want to see what it does ? do aq make test and try: ./bin/ldbsearch -H st/private/sam.ldb --controls=asq:1:member -s base -b 'CN=Administrators,CN=Builtin,DC=samba,DC=example,DC=com' 'objectclass=*' have fun. simo. (This used to be commit 900f4fd3435aacc3351f30afb77d3488d2cb4804)
2007-10-10r12925: implement client side of ASQ controlSimo Sorce1-0/+38
(This used to be commit dd386bdc6ca6fe0b25705d5a375d29e6940b437f)
2007-10-10r12843: get special objects with ldbsearch -a too, to match ldbedit -aStefan Metzmacher1-1/+1
metze (This used to be commit bb68f2e602dbcc94c05b2dd764c163be1e5a583d)
2007-10-10r12833: complete ldbsearch support for controlsSimo Sorce1-37/+135
now the three supported controls (paged_results, server_sort, extended_dn) are fully functional and the infrastructure to add more is in place. valgrind is happy too :) Simo. (This used to be commit bd8e2629378700198e16287823970f52d1150a86)
2007-10-10r12829: fix ldb headers, to not include '<...>' files in .c filesStefan Metzmacher1-7/+1
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later. metze (This used to be commit 380938e97f31c7860aed1e73cc0110c6e17b472e)
2007-10-10r12810: handle control options gracefully and don't segfaultSimo Sorce1-9/+49
(This used to be commit 300d48bc9daa13e1475c10eaa1ec0717c822a7f7)
2007-10-10r12745: Initial work to support a syntax to pass over controls viaSimo Sorce1-9/+75
command line to ldbsearch. Very rough work, no checks are done on the input yet (will segfault if you make it wrong). Controls are passed via the --controls switch an are comma separated (no escaping yet). General syntax is <ctrl_name>:<criticality> <ctrl_name> is a string <criticality> is 1 or 0 Current semi-parsed controls are: server_sort syntax: server_sort:1:0:attributename 1st parm: criticality 2nd parm: reversed 3rd parm: attribute name to be used for sorting todo: still missing suport for multiple sorting attributes and ordering rule no check on result code paged_results syntax: paged_results:1:100 1st parm: criticality 2nd parm: number of results to be returned todo: ldbsearch will return only the first batch (missing code to cycle over conditionally) no check on result code extended_dn syntax: extended_dn:1:0 1st parm: criticality 2nd parm: type, see MS docs on meaning Simo. (This used to be commit 4c685ac0d1638a1d5392dfe733baf0db77e84858)
2007-10-10r12733: Merge ldap/ldb controls into main treeSimo Sorce1-7/+7
There's still lot of work to do but the patch is stable enough to be pushed into the main samba4 tree. Simo. (This used to be commit 77125feaff252cab44d26593093a9c211c846ce8)
2007-10-10r12608: Remove some unused #include lines.Jelmer Vernooij1-1/+0
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10r11567: Ldb API change patch.Simo Sorce1-8/+9
This patch changes the way lsb_search is called and the meaning of the returned integer. The last argument of ldb_search is changed from struct ldb_message to struct ldb_result which contains a pointer to a struct ldb_message list and a count of the number of messages. The return is not the count of messages anymore but instead it is an ldb error value. I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good amount of places. I also tried to double check all my changes being sure that the calling functions would still behave as before. But this patch is big enough that I fear some bug may have been introduced anyway even if it passes the test suite. So if you are currently working on any file being touched please give it a deep look and blame me for any error. Simo. (This used to be commit 22c8c97e6fb466b41859e090e959d7f1134be780)
2007-10-10r10894: make the handling of dn/distinguishedName much closer to realAndrew Tridgell1-1/+1
ldap. Also ensure we put a objectclass on our private ldb's, so they have some chance of being stored in ldap if you want to (This used to be commit 1af2cc067f70f6654d08387fc28def67229bb06a)
2007-10-10r9391: Convert all the code to use struct ldb_dn to ohandle ldap like ↵Simo Sorce1-4/+13
distinguished names Provide more functions to handle DNs in this form (This used to be commit 692e35b7797e39533dd2a1c4b63d9da30f1eb5ba)
2007-10-10r8515: ldb_dn_cmp now uses ldb_dn_compare so that the DNs are comparedSimo Sorce1-2/+5
on a content level not ona form level, his means that the 2 DNs: a) cn= user, dc=this, dc = is,dc=test b) cn=user,dc=this,dc=is,dc=test are now identical even if the string form differ (spaces) (This used to be commit 76d496c30867ae80434483a34b0d842523aed762)
2007-10-10r7833: changed ldbsearch and ldbedit to have command line syntax closer toAndrew Tridgell1-7/+12
ldapsearch. They look for an '=' in the first argument to see if it is a search expression, and if not then it does an 'all records' search (This used to be commit 91cc009fedefa7b263b345dfa511800e0f4f66a8)
2007-10-10r7714: enable samba credentials handling in ldb tools. So you can now do aAndrew Tridgell1-9/+1
encrypted ldbedit against w2k3 (This used to be commit 6277c3923e7d9c26753424b1e77ac62f8e0729a4)
2007-10-10r7709: - convert ldb to use popt, so that it can interact with the sambaAndrew Tridgell1-67/+20
cmdline credentials code (which will be done soon) - added a ldb_init() call, and changed ldb_connect() to take a ldb context. This allows for much better error handling in ldb_connect(), and also made the popt conversion easier - fixed up all the existing backends with the new syntax - improved error handling in *_connect() - fixed a crash bug in the new case_fold_required() code - ensured that ltdb_rename() and all ltdb_search() paths get the read lock - added a ldb_oom() macro to make it easier to report out of memory situations in ldb code (This used to be commit f648fdf187669d6d87d01dd4e786b03cd420f220)
2007-10-10r7438: work in progressDerrell Lipman1-1/+12
(This used to be commit 2fc5343f0637ef3109b079dbc33d6cf4e58c8d5e)
2007-10-10r7276: - moved static tdb function ltdb_dn_fold() into common/ so that it can beDerrell Lipman1-3/+18
called from multiple backends. (ldb_sqlite3 needs it too.) Added parameter for a callback function that determines whether an attribute needs case folding. - begin to prepare for sqlite3 in build process - work-in-progress updates, on ldb_sqlite3 (This used to be commit a80bced0b96ffb655559a43cf7f4d7a34deb5a7d)