s3-net: "idmap check" ignore __db_sequence_number__
authorGregor Beck <gbeck@sernet.de>
Fri, 8 Apr 2011 12:53:25 +0000 (14:53 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 8 Apr 2011 14:44:57 +0000 (16:44 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
source3/utils/net_idmap_check.c

index 556a058..7140f4c 100644 (file)
@@ -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 {
@@ -621,6 +621,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;