s3:registry: fix seqnum race in regdb_fetch_keys_internal
authorMichael Adam <obnox@samba.org>
Wed, 11 Apr 2012 13:51:40 +0000 (15:51 +0200)
committerAndreas Schneider <asn@samba.org>
Wed, 25 Apr 2012 12:31:11 +0000 (14:31 +0200)
commit22451f7f45c1f692dc9d40af0e6ce82666359390
treef813a407c8869e3b9ce964e511dd641f9b0d71c2
parent7ea8bd3605adb3a53ca44ebdabfdcdb9c1aeaa18
s3:registry: fix seqnum race in regdb_fetch_keys_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.

Signed-off-by: Andreas Schneider <asn@samba.org>
source3/registry/reg_backend_db.c