autorid: when storing a new range, always check it does not exist.
commit38157a093bc782ea2f1493229727ff1ecae753dd
authorMichael Adam <obnox@samba.org>
Thu, 20 Mar 2014 14:22:40 +0000 (20 15:22 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 2 Apr 2014 22:26:28 +0000 (3 00:26 +0200)
tree7771df3417724afda340ab01ae58965fd03c87bc
parent0bfb0787194184ac154e4d5c9d16cc0b9e84e007
autorid: when storing a new range, always check it does not exist.

Also check for existence when the range is >= the HWM,
typically the "acquire" case where we bump the HWM.
In case of external modification, we would previously
simply overwrite an an existing range mapping. Now we
check and throw INTERNAL_DB_CORRUPTION in this case.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/idmap_autorid_tdb.c