summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbsearch.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-05ldb: make ldb a top level library for Samba 4.0Andrew Bartlett1-317/+0
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-03-04s4/ldb - remove now superflous "ldb_dn_validate" checksMatthias Dieter Wallnöfer1-3/+2
If we immediately afterwards perform an LDB base operation then we don't need an explicit "ldb_dn_validate" check anymore (only OOM makes sense). Reviewed by: Tridge
2011-03-04ldb:ldb tools - return LDB_ERR_INVALID_DN_SYNTAX on wrong DN parametersMatthias Dieter Wallnöfer1-1/+1
Not all LDB databases have further DN checks. Reviewed by: Tridge
2011-02-09ldb:tools - return LDB_ERR_OPERATIONS_ERROR on generic errorsMatthias Dieter Wallnöfer1-2/+2
Use "return" when located in "main" for consistency ("exit" would do the same). The patchset has been discussed with Jelmer Vernooij and afterwards LDB maintainer Simo Sorce.
2011-02-09ldb:tools - always check if ldb connection has been estabilishedMatthias Dieter Wallnöfer1-1/+1
Otherwise return "LDB_ERR_OPERATIONS_ERROR".
2011-02-09ldb:ldbsearch tool - use LDB result constants where possibleMatthias Dieter Wallnöfer1-7/+7
2011-02-09ldb:ldbsearch tool - simplify error code returnMatthias Dieter Wallnöfer1-3/+1
2011-02-09ldb:ldbsearch tool - use "%u" for printing unsigned integersMatthias Dieter Wallnöfer1-1/+1
2011-01-12ldb:ldbsearch.c - fix possible uninitialised variableMatthias Dieter Wallnöfer1-2/+2
And add a comparison for the "ret" result - this is more standard-oriented
2010-11-01s4-ldb: removed ldb_includes.hAndrew Tridgell1-1/+3
it causes problems with the openchange build as it is not installed Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Mon Nov 1 21:49:47 UTC 2010 on sn-devel-104
2010-11-01s4-ldb: convert existing ldb tools to use new command line hooksAndrew Tridgell1-8/+2
the usage() function needs to take a ldb context, as the popt_options is specific to the ldb context Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-05-31ldb: Fix dependencies when building with system ldb.Jelmer Vernooij1-0/+6
2010-05-02s4-ldb: use a parent context in the ldb utilsAndrew Tridgell1-2/+4
This avoids a talloc free with references error on exit
2010-03-06LDB:tools - change counters to be unsignedMatthias Dieter Wallnöfer1-6/+6
In most cases we do count LDB objects which are enumerated within the "unsigned" type. Therefore no need to use "signed" counters.
2010-02-25s4:ldb Fix segfault in ldbsearch store_referral callbackAndrew Bartlett1-6/+1
sctx->refs_store was not initialised, and that made talloc_realloc grumpy once we started actually returning referrals regularly from Samba4's partitions module (0be57c747825737fa9d64411223e693b055b5f8f by mdw). We now just use talloc_zero() and forget about this manual initialisation work. Tracking down use of uninitialised variables with valgrind was the grand idea when this started, but in practice we just get segfaults in unusual places. Andrew Bartlett
2010-02-13s4: use LDB_TYPESAFE_QSORT() instead of ldb_qsort()Andrew Tridgell1-2/+1
2009-09-02use ldb_cmdline_help() in ldbsearchAndrew Tridgell1-8/+1
2009-02-23Fix headers, ldb_includes.h is a private header,Simo Sorce1-0/+1
do not reference it from ldb.h
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-09-29LDB ASYNC: ldb misc changesSimo Sorce1-34/+42
2008-06-14Make up the right dependencies now that ldb depends on libeventsSimo Sorce1-1/+4
(This used to be commit 3b8eec7ca334528cad3cdcd5e3fc5ee555d8d0e0)
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)