s3:registry: fix seqnum race in fetch_values_internal
commit38cf6c6fc4ec1e8d6d8cce1233cc2c9f21e7491e
authorMichael Adam <obnox@samba.org>
Wed, 11 Apr 2012 13:48:02 +0000 (11 15:48 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 22 Jun 2012 19:41:36 +0000 (22 21:41 +0200)
tree2cfe8583cbf02420bfd0ee6c0d8efe075cc9e63f
parent3a42d5612837908a64d54fecab7bfeccf605fa66
s3:registry: fix seqnum race in fetch_values_internal

This prevents race between fetching seqnum and key content.

Because there is currently no way to atomically fetch the
record along with the seqnum, I use a loop.
This is far from optimal and should should ideally be done
differently. But for now it fixes the race.
(cherry picked from commit 13bccba3c2f6e6fdda2b4a40dd4b1e250a98a7ef)

Conflicts:

source3/registry/reg_backend_db.c
(cherry picked from commit 11413a95a2db14ef14a8f8f4fcb1f11adf44e7a0)
source3/registry/reg_backend_db.c