[SCM] Samba Shared Repository - branch v3-6-test updated

Michael Adam obnox at samba.org
Thu Apr 7 05:14:52 MDT 2011


The branch, v3-6-test has been updated
       via  7200440 s3-net: document "idmap check"
       via  9c01e69 s3-net: fix the usage output of "net idmap check"
      from  d19c9c1 Fix bug 6966 - "allow trusted domains = no" not respected in winbind.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 7200440628f623811ce6598c3d88a0e6561cece7
Author: Gregor Beck <gbeck at sernet.de>
Date:   Thu Apr 7 11:00:41 2011 +0200

    s3-net: document "idmap check"
    
    Signed-off-by: Michael Adam <obnox at samba.org>

commit 9c01e69ade92c171b3f7567e77df1ac02e9f8920
Author: Gregor Beck <gbeck at 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 <obnox at 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


More information about the samba-cvs mailing list