[PATCHES] idmap autorid fixes

Michael Adam obnox at samba.org
Tue Apr 1 05:19:32 MDT 2014


Hi,

attached find  three sets of patches for the autorid idmap code
for master. Theses should be applied in the oder of the naming.
Also available from my master-autorid branch:

https://git.samba.org/?p=obnox/samba/samba-obnox.git;a=shortlog;h=master-autorid


1. The first patchset fixes a race condition in the db
   initialization code that can lead to a corrupted database
   where the range HWM key is reset to zero after it has been
   bumped once or more (especially in a cluster).
   The problem was that while initializing the HWM key in
   a transaction we did not refetch the current value
   inside the transaction, so after checking outside and
   starting the transaction, it might have been created and
   modified by another process...
   This is sort of the minimal patch to fix this issue
   by rechecking the HWM value inside the transaction.
2. The second patchset improves debugging and introduces
   a check for a modified HWM key into the code that acqures
   a new range. This will also catch externally modified
   HWM keys, and hence prevent overwriting ranges.
3. The third patchset makes the fix for #1 more complete
   by wrapping the whole action of the initialization code
   into one big transaction, thereby making the whole
   initialization atomic.

There is no bug report yet for this issue.
We need one for 4.1 and 4.0 (at least).
Since the patches do not apply to those versions,
I think I will have to create a special port of the
minimal fix (#1).

In the meantime review & pushe for these master-patches would be
welcome...

Thanks - Michael


-------------- next part --------------
A non-text attachment was scrubbed...
Name: autorid.patchset1.mbox
Type: application/mbox
Size: 7086 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140401/edb37a19/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autorid.patchset2.mbox
Type: application/mbox
Size: 5088 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140401/edb37a19/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autorid.patchset3.mbox
Type: application/mbox
Size: 14582 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140401/edb37a19/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 215 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140401/edb37a19/attachment.pgp>


More information about the samba-technical mailing list