summaryrefslogtreecommitdiffstats
path: root/lib/tdb/common/check.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-02-04 23:35:53 +0100
committerJeremy Allison <jra@samba.org>2014-05-22 21:05:15 +0200
commitc29e64d97ee18e9d7946151052d1757084f861c6 (patch)
treea812e911fe41dad0e4ed02ffcf9bbd9c895b299a /lib/tdb/common/check.c
parentc0b0648555cd6193a587da4810ac2b0543497ea8 (diff)
downloadsamba-c29e64d97ee18e9d7946151052d1757084f861c6.tar.gz
samba-c29e64d97ee18e9d7946151052d1757084f861c6.tar.xz
samba-c29e64d97ee18e9d7946151052d1757084f861c6.zip
tdb: introduce TDB_SUPPORTED_FEATURE_FLAGS
This will allow to store a feature mask in the tdb header on disk, so that openers can check if they can handle the features other openers are using. Pair-Programmed-With: Volker Lendecke <vl@samba.org> Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/tdb/common/check.c')
-rw-r--r--lib/tdb/common/check.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/tdb/common/check.c b/lib/tdb/common/check.c
index 9f9d8708c1..e632af5153 100644
--- a/lib/tdb/common/check.c
+++ b/lib/tdb/common/check.c
@@ -39,7 +39,9 @@ static bool tdb_check_header(struct tdb_context *tdb, tdb_off_t *recovery)
if (hdr.version != TDB_VERSION)
goto corrupt;
- if (hdr.rwlocks != 0 && hdr.rwlocks != TDB_HASH_RWLOCK_MAGIC)
+ if (hdr.rwlocks != 0 &&
+ hdr.rwlocks != TDB_FEATURE_FLAG_MAGIC &&
+ hdr.rwlocks != TDB_HASH_RWLOCK_MAGIC)
goto corrupt;
tdb_header_hash(tdb, &h1, &h2);