autorid: make the whole initialization atomic with one transaction

Enterprise / Samba - Michael Adam [samba.org] - 2 April 2014 19:41 UTC

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.

5cf6e9c autorid: make the whole initialization atomic with one transaction.
source3/winbindd/idmap_autorid.c | 48 ++++++++++++++++++++++++++++++--------
1 file changed, 38 insertions(+), 10 deletions(-)

Upstream: gitweb.samba.org


  • Share