The branch, master has been updated via c1a5670 s3-net: document "idmap check" via 7d04043 s3-net: fix the usage output of "net idmap check" from 17fe5e0 s4-samba_dnsupate Fix syntax error
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit c1a5670e4f4be49d9758e35cdc903418db9a363e Author: Gregor Beck <gb...@sernet.de> Date: Thu Apr 7 11:00:41 2011 +0200 s3-net: document "idmap check" Signed-off-by: Michael Adam <ob...@samba.org> Autobuild-User: Michael Adam <ob...@samba.org> Autobuild-Date: Thu Apr 7 13:58:13 CEST 2011 on sn-devel-104 commit 7d040434dcb7c75d8aefc982f60995adde08a445 Author: Gregor Beck <gb...@sernet.de> Date: Thu Apr 7 11:00:41 2011 +0200 s3-net: fix the usage output of "net idmap check" Signed-off-by: Michael Adam <ob...@samba.org> ----------------------------------------------------------------------- Summary of changes: docs-xml/manpages-3/net.8.xml | 92 +++++++++++++++++++++++++++++++++++++++++ source3/utils/net_idmap.c | 9 ++-- 2 files changed, 97 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/net.8.xml b/docs-xml/manpages-3/net.8.xml index 8e5ece0..d69a3b7 100644 --- a/docs-xml/manpages-3/net.8.xml +++ b/docs-xml/manpages-3/net.8.xml @@ -1293,6 +1293,98 @@ Use -f to delete an invalid partial mapping <ID> -> xx </para> </refsect2> +<refsect2> + +<title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=<DB>]</title> + +<para> + Check and repair the IDMAP database. If no option is given a read only check + of the database is done. Among others an interactive or automatic repair mode + may be chosen with one of the following options: + + <variablelist> + <varlistentry><term>-r|--repair</term> + <listitem><para> + Interactive repair mode, ask a lot of questions. + </para></listitem> + </varlistentry> + + <varlistentry><term>-a|--auto</term> + <listitem><para> + Noninteractive repair mode, use default answers. + </para></listitem> + </varlistentry> + + <varlistentry><term>-v|--verbose</term> + <listitem><para> + Produce more output. + </para></listitem> + </varlistentry> + + <varlistentry><term>-f|--force</term> + <listitem><para> + Try to apply changes, even if they do not apply cleanly. + </para></listitem> + </varlistentry> + + <varlistentry><term>-T|--test</term> + <listitem><para> + Dry run, show what changes would be made but don't touch anything. + </para></listitem> + </varlistentry> + + <varlistentry><term>-l|--lock</term> + <listitem><para> + Lock the database while doing the check. + </para></listitem> + </varlistentry> + + <varlistentry><term>--db <DB></term> + <listitem><para> + Check the specified database. + </para></listitem> + </varlistentry> + <varlistentry><term></term> + <listitem><para> + </para></listitem> + </varlistentry> + </variablelist> + + It reports about the finding of the following errors: + + <variablelist> + <varlistentry><term>Missing reverse mapping:</term> + <listitem><para> + A record with mapping A->B where there is no B->A. Default action + in repair mode is to "fix" this by adding the reverse mapping. + </para></listitem> + </varlistentry> + + <varlistentry><term>Invalid mapping:</term> + <listitem><para> + A record with mapping A->B where B->C. Default action + is to "delete" this record. + </para></listitem> + </varlistentry> + + <varlistentry><term>Missing or invalid HWM:</term> + <listitem><para> + A high water mark is not at least equal to the largest ID in the + database. Default action is to "fix" this by setting it to the + largest ID found +1. + </para></listitem> + </varlistentry> + + <varlistentry><term>Invalid record:</term> + <listitem><para> + Something we failed to parse. Default action is to "edit" it + in interactive and "delete" it in automatic mode. + </para></listitem> + </varlistentry> +</variablelist> +</para> +</refsect2> + <refsect2> <title>USERSHARE</title> diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c index c8241e2..e059a64 100644 --- a/source3/utils/net_idmap.c +++ b/source3/utils/net_idmap.c @@ -543,13 +543,14 @@ static int net_idmap_check(struct net_context *c, int argc, const char **argv) if ( argc > 1 || c->display_usage) { d_printf("%s\n%s", _("Usage:"), - _("net idmap check [-f] [-a] [-T] [-v] [--auto] [[--db=]<TDB>]\n" + _("net idmap check [-v] [-r] [-a] [-T] [-f] [-l] [[--db=]<TDB>]\n" " Check an idmap database.\n" + " --verbose,-v\tverbose\n" " --repair,-r\trepair\n" - " --fore,-f\tforce\n" " --auto,-a\tnoninteractive mode\n" " --test,-T\tdry run\n" - " --lock\tlock db while doing the check\n" + " --fore,-f\tforce\n" + " --lock,-l\tlock db while doing the check\n" " TDB\tidmap database\n")); return c->display_usage ? 0 : -1; } @@ -561,7 +562,7 @@ static int net_idmap_check(struct net_context *c, int argc, const char **argv) d_fprintf(stderr, _("check database: %s\n"), dbfile); opts = (struct check_options) { - .lock = c->opt_lock, + .lock = c->opt_lock || c->opt_long_list_entries, .test = c->opt_testmode, .automatic = c->opt_auto, .verbose = c->opt_verbose, -- Samba Shared Repository