s3:net idmap check: fix output of an invalid record
authorMichael Adam <obnox@samba.org>
Fri, 8 Apr 2011 12:49:43 +0000 (14:49 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 8 Apr 2011 15:29:31 +0000 (17:29 +0200)
Only print the value number for hwm, version and seqnum keys.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Apr  8 17:29:31 CEST 2011 on sn-devel-104

source3/utils/net_idmap_check.c

index 7140f4c2a9afc2f9f51421f18acfa087ae5ac6c2..88725e18a614ddec1b0a14f95d2ee40b06018938 100644 (file)
@@ -225,8 +225,13 @@ static char get_action(struct check_action* a, struct record* r, TDB_DATA* v) {
                        d_printf("%s: %s ", a->name, print_data(r, r->key));
                        if (is_map(r)) {
                                d_printf("-> %s\n", print_data(r, r->val));
-                       } else {
+                       } else if (r->key_type == DT_HWM ||
+                                  r->key_type == DT_VER ||
+                                  r->key_type == DT_SEQ)
+                       {
                                d_printf(": %ld\n", r->id);
+                       } else {
+                               d_printf("\n");
                        }
                } else {
                        d_printf(a->fmt, a->name,