r9712: Bunch of small fixes
[sfrench/samba-autobuild/.git] / source4 / lib / samba3 / idmap.c
index 1583ad447658206adddbf2b14957364c02109dab..b1c7c0dcca4f597d9d1224898623774b76df025e 100644 (file)
  Initialise idmap database. 
 *****************************************************************************/
 
-NTSTATUS samba3_read_idmap( const char *fn, TALLOC_CTX *ctx, struct samba3_idmapdb *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;
 
        /* Open idmap repository */
        if (!(tdb = tdb_open(fn, 0, TDB_DEFAULT, O_RDONLY, 0644))) {
-               DEBUG(0, ("idmap_init: Unable to open idmap database\n"));
+               DEBUG(0, ("idmap_init: Unable to open idmap database '%s'\n", fn));
                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);