The branch, v3-6-test has been updated
       via  0a660c4 s3:net idmap check: fix output of an invalid record
       via  494dda9 s3-net: "idmap check" ignore __db_sequence_number__
      from  50755b2 s3:net rpc trust: fix two C++ implicit void * cast warnings

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


- Log -----------------------------------------------------------------
commit 0a660c4258264295be875c8e39747a2d464d2f18
Author: Michael Adam <ob...@samba.org>
Date:   Fri Apr 8 14:49:43 2011 +0200

    s3:net idmap check: fix output of an invalid record
    
    Only print the value number for hwm, version and seqnum keys.
    
    Pair-Programmed-With: Gregor Beck <gb...@sernet.de>
    
    Autobuild-User: Michael Adam <ob...@samba.org>
    Autobuild-Date: Fri Apr  8 17:29:31 CEST 2011 on sn-devel-104

commit 494dda9bdea0b5d0f2266690f91b4782a94279b9
Author: Gregor Beck <gb...@sernet.de>
Date:   Fri Apr 8 14:53:25 2011 +0200

    s3-net: "idmap check" ignore __db_sequence_number__
    
    Signed-off-by: Michael Adam <ob...@samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/utils/net_idmap_check.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_idmap_check.c b/source3/utils/net_idmap_check.c
index 556a058..88725e1 100644
--- a/source3/utils/net_idmap_check.c
+++ b/source3/utils/net_idmap_check.c
@@ -52,7 +52,7 @@ static bool is_empty(TDB_DATA data) {
 enum DT {
        DT_INV = 0,
        DT_SID, DT_UID, DT_GID,
-       DT_HWM, DT_VER
+       DT_HWM, DT_VER, DT_SEQ,
 };
 
 struct record {
@@ -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,
@@ -621,6 +626,12 @@ parse_record(TALLOC_CTX* mem_ctx, TDB_DATA key, TDB_DATA 
val)
                        ret->id = IVAL(val.dptr,0);
                        ret->val_type = DT_VER;
                }
+       } else if (strcmp((const char*)key.dptr, "__db_sequence_number__") == 
0) {
+               ret->key_type = DT_SEQ;
+               if (val.dsize == 8) {
+                       ret->id = *(uint64_t*)val.dptr;
+                       ret->val_type = DT_SEQ;
+               }
        }
 
        return ret;


-- 
Samba Shared Repository

Reply via email to