s3:registry: fix seqnum race in regdb_fetch_keys_internal
commit325556480fa6d085011765d13b0a0dc263c92afc
authorMichael Adam <obnox@samba.org>
Wed, 11 Apr 2012 13:51:40 +0000 (11 15:51 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 22 Jun 2012 19:41:43 +0000 (22 21:41 +0200)
tree5e5da511f15d71d75538653c675aadd3f26b1433
parent4c23d381b524b0e1a7342eb9365df9ee5207c5fa
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)
(cherry picked from commit 521c7ea32d36263d218d98fc31420afc1b7cb0e1)
source3/registry/reg_backend_db.c