summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/tdb/tdb.c13
-rw-r--r--source3/tdb/tdb.h1
2 files changed, 3 insertions, 11 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index bc7c90613c..31d4d0dfcc 100644
--- a/source3/tdb/tdb.c
+++ b/source3/tdb/tdb.c
@@ -35,7 +35,7 @@
#include "includes.h"
#endif
-#define TDB_VERSION (0x26011967 + 2)
+#define TDB_VERSION (0x26011967 + 3)
#define TDB_MAGIC (0x26011999U)
#define TDB_FREE_MAGIC (~TDB_MAGIC)
#define TDB_ALIGN 4
@@ -43,8 +43,7 @@
#define DEFAULT_HASH_SIZE 131
#define TDB_PAGE_SIZE 0x2000
#define TDB_LEN_MULTIPLIER 10
-#define TDB_RESERVED 1024
-#define FREELIST_TOP (TDB_RESERVED + sizeof(struct tdb_header))
+#define FREELIST_TOP (sizeof(struct tdb_header))
#define LOCK_SET 1
#define LOCK_CLEAR 0
@@ -498,7 +497,6 @@ static int tdb_new_database(TDB_CONTEXT *tdb, int hash_size)
tdb_off offset;
int i, size = 0;
tdb_off buf[16];
- char buf2[TDB_RESERVED];
/* create the header */
memset(&header, 0, sizeof(header));
@@ -516,13 +514,6 @@ static int tdb_new_database(TDB_CONTEXT *tdb, int hash_size)
return -1;
} else size += sizeof(header);
- memset(buf2, 0, sizeof(buf2));
- if (tdb->fd != -1 && write(tdb->fd, buf2, TDB_RESERVED) !=
- TDB_RESERVED) {
- tdb->ecode = TDB_ERR_IO;
- return -1;
- } else size += TDB_RESERVED;
-
/* the freelist and hash pointers */
offset = 0;
memset(buf, 0, sizeof(buf));
diff --git a/source3/tdb/tdb.h b/source3/tdb/tdb.h
index f4039f119c..47254b5013 100644
--- a/source3/tdb/tdb.h
+++ b/source3/tdb/tdb.h
@@ -29,6 +29,7 @@ struct tdb_header {
char magic_food[32]; /* for /etc/magic */
unsigned version; /* version of the code */
unsigned hash_size; /* number of hash entries */
+ tdb_off reserved[32];
};
typedef struct {