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)
committerKarolin Seeger <kseeger@samba.org>
Thu, 10 May 2012 09:15:36 +0000 (11:15 +0200)
commit521c7ea32d36263d218d98fc31420afc1b7cb0e1
tree2a3c8a3c797889a060fdc3f9722ca0f85c404e79
parent2517f435574876ad44bf0212f507114a610f2377
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.
(cherry picked from commit 66fcac5e479a530091ecb43d9f8cf90f4351ad17)
source3/registry/reg_backend_db.c