s3:registry: fix seqnum race in fetch_values_internal
authorMichael Adam <obnox@samba.org>
Wed, 11 Apr 2012 13:48:02 +0000 (15:48 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 10 May 2012 09:15:32 +0000 (11:15 +0200)
commit11413a95a2db14ef14a8f8f4fcb1f11adf44e7a0
treed3fdf5fdc217f5bc97e1153f37a53524c3708f1a
parent96f08f6d43cb9bebda175efd5719ca15549a5b99
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
source3/registry/reg_backend_db.c