summaryrefslogtreecommitdiffstats
path: root/source4/lib/ldb/tools/ldbedit.c
Commit message (Collapse)AuthorAgeFilesLines
* ldb: make ldb a top level library for Samba 4.0Andrew Bartlett2011-07-051-372/+0
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* ldb: detect eof on ldif filesAndrew Tridgell2011-03-291-0/+15
| | | | | | | use feof() to detect parsing errors in ldif files Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Mar 29 08:24:04 CEST 2011 on sn-devel-104
* s4/ldb - remove now superflous "ldb_dn_validate" checksMatthias Dieter Wallnöfer2011-03-041-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
* ldb:ldb tools - return LDB_ERR_INVALID_DN_SYNTAX on wrong DN parametersMatthias Dieter Wallnöfer2011-03-041-1/+1
| | | | | | Not all LDB databases have further DN checks. Reviewed by: Tridge
* ldb:tools - return LDB_ERR_OPERATIONS_ERROR on generic errorsMatthias Dieter Wallnöfer2011-02-091-4/+4
| | | | | | | | 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.
* ldb:tools - always check if ldb connection has been estabilishedMatthias Dieter Wallnöfer2011-02-091-0/+3
| | | | Otherwise return "LDB_ERR_OPERATIONS_ERROR".
* ldb:ldbedit tool - don't forget about the "do_edit" result codeMatthias Dieter Wallnöfer2011-02-091-11/+4
| | | | | | Use it for computing the program exit code. The "result" has not to be free'd explicitly since it's a child by "ldb" which itself is child by "mem_ctx".
* ldb:ldbedit tool - fix bug #7914Matthias Dieter Wallnöfer2011-02-091-4/+7
| | | | | | | "modify_record" returns "-1" when failing, otherwise the number of modifies performed as an "unsigned int" converted to "int". When we get "-1" we immediately need to stop (the error message has already been generated by the function itself).
* ldb:ldbedit tool - use unsigned counters for consistency with other LDB toolsMatthias Dieter Wallnöfer2011-02-091-2/+2
|
* ldb:ldbedit tool - use "%u" for printing out unsigned integersMatthias Dieter Wallnöfer2011-02-091-2/+2
|
* ldb:ldbedit tool - use LDB result constants where neededMatthias Dieter Wallnöfer2011-02-091-5/+5
|
* s4-ldb: honor controls on search in ldbeditAndrew Tridgell2010-11-041-1/+8
|
* s4-ldb: removed ldb_includes.hAndrew Tridgell2010-11-011-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
* s4-ldb: convert existing ldb tools to use new command line hooksAndrew Tridgell2010-11-011-8/+3
| | | | | | | 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>
* s4: Remove trailing whitespacesKamen Mazdrashki2010-07-191-9/+9
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-tools: use ldb_msg_difference() in ldbedit - modify_record()Kamen Mazdrashki2010-07-191-6/+10
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* ldb: Fix dependencies when building with system ldb.Jelmer Vernooij2010-05-311-0/+7
|
* s4:ldb: add --controls support to ldbeditStefan Metzmacher2010-05-211-5/+12
| | | | metze
* s4-ldb: use a parent context in the ldb utilsAndrew Tridgell2010-05-021-2/+4
| | | | This avoids a talloc free with references error on exit
* LDB:tools - change counters to be unsignedMatthias Dieter Wallnöfer2010-03-061-10/+10
| | | | | In most cases we do count LDB objects which are enumerated within the "unsigned" type. Therefore no need to use "signed" counters.
* ldb: ensure we cancel a ldb transactionAndrew Tridgell2009-09-041-0/+2
| | | | | | When we fail a ldbadd or ldbedit we should cancel the transaction to prevent ldb giving a warning about having a open transaction in the ldb destructor
* show the full set of command line options for ldb toolsAndrew Tridgell2009-09-021-7/+1
| | | | | I always found it hard to remember some of the options. We might as well use popt to give us the full list
* Fix headers, ldb_includes.h is a private header,Simo Sorce2009-02-231-1/+1
| | | | do not reference it from ldb.h
* Fix the mess with ldb includes.Simo Sorce2009-01-301-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.
* Print error strings when transactions fail in ldb toolsAndrew Bartlett2008-12-181-2/+2
|
* use transactions in ldbadd, ldbmodify and ldbeditAndrew Tridgell2008-12-161-0/+10
| | | | | | | | The command line tools ldbadd, ldbmodify and ldbedit should operate within a transaction to make them more efficient. The ldbadd tool in particular is much faster when adding a large number of records if all the adds happen within a transaction. Previously there was a transaction per record.
* Merge ldb_search() and ldb_search_exp_fmt() into a simgle function.Simo Sorce2008-09-231-1/+1
| | | | | The previous ldb_search() interface made it way too easy to leak results, and being able to use a printf-like expression turns to be really useful.
* Make up the right dependencies now that ldb depends on libeventsSimo Sorce2008-06-141-1/+1
| | | | (This used to be commit 3b8eec7ca334528cad3cdcd5e3fc5ee555d8d0e0)
* Fix static module list generation for ldb.Jelmer Vernooij2008-02-201-2/+0
| | | | (This used to be commit 92c1c0e9137f0845cac6cc96bf78711b6aaffe21)
* r23798: updated old Temple Place FSF addresses to new URLAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb)
* r23795: more v2->v3 conversionAndrew Tridgell2007-10-101-1/+1
| | | | (This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac)
* r22681: Fix standalone ldb build when parent directory name != ldb.Jelmer Vernooij2007-10-101-3/+2
| | | | (This used to be commit 1093875d59f1ea9b8bd82277d4f9d8366e584952)
* r19832: better prototypes for the linearization functions:Simo Sorce2007-10-101-3/+3
| | | | | | | | | - ldb_dn_get_linearized returns a const string - ldb_dn_alloc_linearized allocs astring with the linearized dn (This used to be commit 3929c086d5d0b3f08b1c4f2f3f9602c3f4a9a4bd)
* r19831: Big ldb_dn optimization and interfaces enhancement patchSimo Sorce2007-10-101-4/+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)
* r18840: make these compatible with g++ warningsAndrew Tridgell2007-10-101-10/+10
| | | | (This used to be commit bcfa93954fdb00f500f174cd227e3d9b2ef94fdc)
* r17740: get rid of dependence on asprintf(), using talloc_asprintf() insteadAndrew Tridgell2007-10-101-2/+2
| | | | (This used to be commit 0e350ea0c1bba278995da5e8de677c5651eb623e)
* r15370: Fix more dependencies for shared libsJelmer Vernooij2007-10-101-1/+1
| | | | (This used to be commit 9a518661fbb76bf1c153afc6f581e888186dc165)
* r13786: [merge] Add registration functions for LDB modulesJelmer Vernooij2007-10-101-0/+2
| | | | | | | | | | 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)
* r12843: get special objects with ldbsearch -a too, to match ldbedit -aStefan Metzmacher2007-10-101-1/+1
| | | | | metze (This used to be commit bb68f2e602dbcc94c05b2dd764c163be1e5a583d)
* r12829: fix ldb headers, to not include '<...>' files in .c filesStefan Metzmacher2007-10-101-7/+1
| | | | | | | this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later. metze (This used to be commit 380938e97f31c7860aed1e73cc0110c6e17b472e)
* r12733: Merge ldap/ldb controls into main treeSimo Sorce2007-10-101-0/+1
| | | | | | | | 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)
* r12608: Remove some unused #include lines.Jelmer Vernooij2007-10-101-1/+0
| | | | (This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
* r12605: docs patch from Brad Hards <bradh@frogmouth.net>Simo Sorce2007-10-101-1/+1
| | | | (This used to be commit 874f16e055ec30bf2ee52a33464b4810a8f8cd89)
* r11567: Ldb API change patch.Simo Sorce2007-10-101-7/+8
| | | | | | | | | | | | | | | | 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)
* r10894: make the handling of dn/distinguishedName much closer to realAndrew Tridgell2007-10-101-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)
* r9391: Convert all the code to use struct ldb_dn to ohandle ldap like ↵Simo Sorce2007-10-101-6/+17
| | | | | | | distinguished names Provide more functions to handle DNs in this form (This used to be commit 692e35b7797e39533dd2a1c4b63d9da30f1eb5ba)
* r8515: ldb_dn_cmp now uses ldb_dn_compare so that the DNs are comparedSimo Sorce2007-10-101-4/+6
| | | | | | | | 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)
* r7833: changed ldbsearch and ldbedit to have command line syntax closer toAndrew Tridgell2007-10-101-11/+6
| | | | | | 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)
* r7741: fixed the verbose option in ldbeditAndrew Tridgell2007-10-101-12/+11
| | | | (This used to be commit a440133140a6adb5ea62d37690b9c4ae74dc6be0)
* r7714: enable samba credentials handling in ldb tools. So you can now do aAndrew Tridgell2007-10-101-8/+0
| | | | | encrypted ldbedit against w2k3 (This used to be commit 6277c3923e7d9c26753424b1e77ac62f8e0729a4)