Ignore 3.0 style invalid group mappings during upgrade to ldb
authorVolker Lendecke <vl@samba.org>
Tue, 4 Nov 2008 12:33:36 +0000 (04:33 -0800)
committerJeremy Allison <jra@samba.org>
Tue, 4 Nov 2008 12:33:36 +0000 (04:33 -0800)
source/groupdb/mapping_ldb.c

index 7ce879fb6ed9eb40931956a4c42c3acc760287fb..68e5b4cd5e965d1ca85f918779caf821f5209fcf 100644 (file)
@@ -574,6 +574,13 @@ static int upgrade_map_record(TDB_CONTEXT *tdb_ctx, TDB_DATA key,
                return -1;
        }
 
+       if ((int)map.gid == -1) {
+               /*
+                * Ignore old invalid mappings
+                */
+               return 0;
+       }
+
        if (!add_mapping_entry(&map, 0)) {
                DEBUG(0,("Failed to add mapping entry during upgrade\n"));
                *(int *)state = -1;