From 67d21b5a4ba35244c4362130ce7c501c89839429 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 21 Mar 2002 23:39:17 +0000 Subject: Make winbindd_idmap tdb endian independent. This is very important for sharing between machines with rsync. Finally removed tdb_store_int/tdb_fetch_int. Now only tdb_store_int32/tdb_fetch_int32 which are endian independent are allowed. Jeremy. (This used to be commit 1c4a00dcc13f4a7c5876a5cf63ca730190d1132e) --- source3/nmbd/nmbd_winsserver.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/nmbd/nmbd_winsserver.c') diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index 75f93eafde..3332e99e9d 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -240,7 +240,7 @@ BOOL initialise_wins(void) return True; } - if (tdb_fetch_int(tdb, INFO_VERSION) != WINS_VERSION) { + if (tdb_fetch_int32(tdb, INFO_VERSION) != WINS_VERSION) { DEBUG(0,("Discarding invalid wins.dat file\n")); tdb_close(tdb); return True; @@ -1766,7 +1766,7 @@ void wins_write_database(BOOL background) DEBUG(3,("wins_write_database: Dump of WINS name list.\n")); - tdb_store_int(tdb, INFO_VERSION, WINS_VERSION); + tdb_store_int32(tdb, INFO_VERSION, WINS_VERSION); for (namerec = (struct name_record *)ubi_trFirst( wins_server_subnet->namelist ); namerec; @@ -1823,12 +1823,12 @@ void wins_write_database(BOOL background) } /* store the number of records */ - tdb_store_int(tdb, INFO_COUNT, num_record); + tdb_store_int32(tdb, INFO_COUNT, num_record); /* get and store the last used ID */ get_global_id_and_update(&id, False); - tdb_store_int(tdb, INFO_ID_HIGH, id>>32); - tdb_store_int(tdb, INFO_ID_LOW, id&0xffffffff); + tdb_store_int32(tdb, INFO_ID_HIGH, id>>32); + tdb_store_int32(tdb, INFO_ID_LOW, id&0xffffffff); tdb_close(tdb); -- cgit