From f52b42c75fda1069664fdbedf392e4fca87d7fc0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 18 Jun 2005 07:43:52 +0000 Subject: r7710: new command line handling code for ldb (This used to be commit 5e8db1c9b3bb6c5196652a7af877b4204148c305) --- source4/lib/ldb/tools/cmdline.h | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 source4/lib/ldb/tools/cmdline.h (limited to 'source4/lib/ldb/tools/cmdline.h') diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h new file mode 100644 index 0000000000..f3eae26cce --- /dev/null +++ b/source4/lib/ldb/tools/cmdline.h @@ -0,0 +1,47 @@ +/* + ldb database library - command line handling for ldb tools + + Copyright (C) Andrew Tridgell 2005 + + ** NOTE! The following LGPL license applies to the ldb + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include + +struct ldb_cmdline { + const char *url; + enum ldb_scope scope; + const char *basedn; + int interactive; + int sorted; + const char *editor; + int verbose; + int recursive; + int all_records; + const char **options; + int argc; + const char **argv; + int num_records; + int num_searches; +}; + +struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const char **argv, + void (*usage)(void)); + + -- cgit From f40e69da2633771a42ec2b74fca63bd0b0a37e4a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 18 Jun 2005 09:01:09 +0000 Subject: r7714: enable samba credentials handling in ldb tools. So you can now do a encrypted ldbedit against w2k3 (This used to be commit 6277c3923e7d9c26753424b1e77ac62f8e0729a4) --- source4/lib/ldb/tools/cmdline.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/ldb/tools/cmdline.h') diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h index f3eae26cce..8e479c5538 100644 --- a/source4/lib/ldb/tools/cmdline.h +++ b/source4/lib/ldb/tools/cmdline.h @@ -39,6 +39,7 @@ struct ldb_cmdline { const char **argv; int num_records; int num_searches; + const char *sasl_mechanism; }; struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const char **argv, -- cgit From 3e4c4cff2177af33efdb15f03a1bbcb639505cee Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 18 Aug 2005 15:02:01 +0000 Subject: r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names Provide more functions to handle DNs in this form (This used to be commit 692e35b7797e39533dd2a1c4b63d9da30f1eb5ba) --- source4/lib/ldb/tools/cmdline.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/lib/ldb/tools/cmdline.h') diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h index 8e479c5538..daf9c06f42 100644 --- a/source4/lib/ldb/tools/cmdline.h +++ b/source4/lib/ldb/tools/cmdline.h @@ -40,6 +40,8 @@ struct ldb_cmdline { int num_records; int num_searches; const char *sasl_mechanism; + const char *input; + const char *output; }; struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const char **argv, -- cgit From d78ea3e34abd30fb388c4cc39e12611e211416a6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 22 Sep 2005 04:16:46 +0000 Subject: r10406: added --nosync option to all ldb tools, so that you can control if transactions are synchronous or not on the command line. add LDB_FLG_NOSYNC flag to ldb_connect() so we can make our temporary ldb databases non-synchronous (This used to be commit dba41164e0c52f1e4351bd9057b16661cee3a822) --- source4/lib/ldb/tools/cmdline.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/ldb/tools/cmdline.h') diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h index daf9c06f42..9aaf37a978 100644 --- a/source4/lib/ldb/tools/cmdline.h +++ b/source4/lib/ldb/tools/cmdline.h @@ -34,6 +34,7 @@ struct ldb_cmdline { int verbose; int recursive; int all_records; + int nosync; const char **options; int argc; const char **argv; -- cgit From b51fe793c7cefb693d6d3633272b82238e712abe Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 6 Jan 2006 19:42:08 +0000 Subject: r12745: Initial work to support a syntax to pass over controls via 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 : is a string 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) --- source4/lib/ldb/tools/cmdline.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/ldb/tools/cmdline.h') diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h index 9aaf37a978..3b195f3e84 100644 --- a/source4/lib/ldb/tools/cmdline.h +++ b/source4/lib/ldb/tools/cmdline.h @@ -43,6 +43,7 @@ struct ldb_cmdline { const char *sasl_mechanism; const char *input; const char *output; + char **controls; }; struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const char **argv, -- cgit From f81d80a4afd77cd100832b80bc2383d7c19a71a8 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 18 Jan 2006 04:36:30 +0000 Subject: r12989: move the control parsing and handleng functions to cmdline.c so that they can be used by the other ldb tools as well (This used to be commit c12b3c5cb46d428f815c623efacff8edebb6f6e3) --- source4/lib/ldb/tools/cmdline.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/lib/ldb/tools/cmdline.h') diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h index 3b195f3e84..0855f77575 100644 --- a/source4/lib/ldb/tools/cmdline.h +++ b/source4/lib/ldb/tools/cmdline.h @@ -50,3 +50,5 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const void (*usage)(void)); +struct ldb_control **parse_controls(void *mem_ctx, char **control_strings); +int handle_controls_reply(struct ldb_control **reply, struct ldb_control **request); -- cgit From b8d69a7ea2505b706ff7c74d7c97bc89d82dfa07 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:46:15 +0000 Subject: r23795: more v2->v3 conversion (This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac) --- source4/lib/ldb/tools/cmdline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/ldb/tools/cmdline.h') diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h index 0855f77575..5cf9b3cc3a 100644 --- a/source4/lib/ldb/tools/cmdline.h +++ b/source4/lib/ldb/tools/cmdline.h @@ -10,7 +10,7 @@ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -- cgit From 6c973f4e8ccbcb6c9275f8a54e26abb19df7e15a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 03:42:26 +0000 Subject: r23798: updated old Temple Place FSF addresses to new URL (This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb) --- source4/lib/ldb/tools/cmdline.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/lib/ldb/tools/cmdline.h') diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h index 5cf9b3cc3a..ae295d68a4 100644 --- a/source4/lib/ldb/tools/cmdline.h +++ b/source4/lib/ldb/tools/cmdline.h @@ -18,8 +18,7 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ #include -- cgit From f017f871078fd2219766ea061468268acb92140c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 5 Nov 2007 21:57:33 +0100 Subject: r25842: Start working on test for loading dso's in ldb. (This used to be commit d41ed7ca8d3954bf586126edd7aba17acc6af8a1) --- source4/lib/ldb/tools/cmdline.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/ldb/tools/cmdline.h') diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h index ae295d68a4..3473d62a16 100644 --- a/source4/lib/ldb/tools/cmdline.h +++ b/source4/lib/ldb/tools/cmdline.h @@ -27,6 +27,7 @@ struct ldb_cmdline { const char *url; enum ldb_scope scope; const char *basedn; + const char *modules_path; int interactive; int sorted; const char *editor; -- cgit