autorid: make the whole initialization atomic with one transaction.
authorMichael Adam <obnox@samba.org>
Thu, 20 Mar 2014 23:18:36 +0000 (00:18 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 3 Apr 2014 00:41:25 +0000 (02:41 +0200)
commit5cf6e9c8520be49aa57436bf725521cdc5d160f8
tree8715983cb4126c125c92348e592cc9f26b996858
parentfc987cf289e620358db945b8372aba16cdc0ea8a
autorid: make the whole initialization atomic with one transaction.

Originally, there were several writing operations:

- store the range HWM
- store the alloc uid HWM
- store the alloc gid HWM
- store the config
- create mappings for a whole list of wellknown sids

Each of these consisted of its own transaction,
the wellknown preallocation even of one transaction per sid.

This change wrapps all of these in one big transaction.
Thereby making the whole initialization atomic, and
with respect to the creation of the wellknown mappings
also more deterministic.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr  3 02:41:25 CEST 2014 on sn-devel-104
source3/winbindd/idmap_autorid.c