r9621: Bunch of bug fixes. Add 'format' option to samba3dump (text,summary,ldif)
[sfrench/samba-autobuild/.git] / source4 / lib / samba3 / idmap.c
index c541c5bc92fe664727f791afd8dd689f86767e40..ce3d098d3a59d6e419a15fe4dff4915b94184f20 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "includes.h"
 #include "lib/tdb/include/tdbutil.h"
-#include "lib/samba3/sam.h"
+#include "lib/samba3/samba3.h"
 #include "system/filesys.h"
 
 /* High water mark keys */
@@ -39,9 +39,8 @@
  Initialise idmap database. 
 *****************************************************************************/
 
-NTSTATUS samba3_read_idmap( const char *fn, TALLOC_CTX *ctx, struct samba3_idmap *idmap )
+NTSTATUS samba3_read_idmap( const char *fn, TALLOC_CTX *ctx, struct samba3_idmapdb *idmap )
 {
-       int32_t version;
        TDB_CONTEXT *tdb;
        TDB_DATA key, val;
 
@@ -51,13 +50,6 @@ NTSTATUS samba3_read_idmap( const char *fn, TALLOC_CTX *ctx, struct samba3_idmap
                return NT_STATUS_UNSUCCESSFUL;
        }
 
-       /* check against earlier versions */
-       version = tdb_fetch_int32(tdb, "IDMAP_VERSION");
-       if (version != IDMAP_VERSION) {
-               DEBUG(0, ("idmap_init: Unable to open idmap database, it's in an old format!\n"));
-               return NT_STATUS_INTERNAL_DB_ERROR;
-       }
-
        idmap->mapping_count = 0;
        idmap->mappings = NULL;
        idmap->user_hwm = tdb_fetch_int32(tdb, HWM_USER);