summaryrefslogtreecommitdiff
path: root/lib/tdb_compat
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-09-14 08:13:28 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-09-14 02:21:29 +0200
commit84a4289b5236e38ab0afc6ef3c784d202c6b3c2c (patch)
tree6e8a59b6c89a2af531929c169df444ba41d21672 /lib/tdb_compat
parent72c4074c65b7a525b001b9787d8b922538898a89 (diff)
downloadsamba-84a4289b5236e38ab0afc6ef3c784d202c6b3c2c.tar.gz
samba-84a4289b5236e38ab0afc6ef3c784d202c6b3c2c.tar.bz2
samba-84a4289b5236e38ab0afc6ef3c784d202c6b3c2c.zip
tdb_compat: change offset of CLEAR_IF_FIRST lock.
This makes it match tdb1, which mean it will Just Work as TDB2 gets tdb1 format support. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Wed Sep 14 02:21:29 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib/tdb_compat')
-rw-r--r--lib/tdb_compat/tdb_compat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tdb_compat/tdb_compat.c b/lib/tdb_compat/tdb_compat.c
index 6e4813b56e..fd3a68717a 100644
--- a/lib/tdb_compat/tdb_compat.c
+++ b/lib/tdb_compat/tdb_compat.c
@@ -63,12 +63,12 @@ int64_t tdb_traverse_read_(struct tdb_context *tdb,
*/
static enum TDB_ERROR clear_if_first(int fd, void *unused)
{
- /* We hold a lock offset 63 always, so we can tell if anyone else is. */
+ /* We hold a lock offset 4 always, so we can tell if anyone else is. */
struct flock fl;
fl.l_type = F_WRLCK;
fl.l_whence = SEEK_SET;
- fl.l_start = 63;
+ fl.l_start = 4; /* ACTIVE_LOCK */
fl.l_len = 1;
if (fcntl(fd, F_SETLK, &fl) == 0) {