New version of the patch is attached.
Changes from previous iteration:
- version-info set to 0:2:0
- init function remains backward compatible, but it sets default
oadptions needed for range calculation. Non default values can be set
via ded setters.
- sss_idmap_opts moved to private header
- both setters and getters check for sss_idmap_ctx validity
- slice_num removed from range structure
- min and max id are used to check for collisions with existing domains
when calculating range for new domain
- off by one error mentioned by Stephen was fixed (s/>/>=)
- the parameter slice in sss_idmap_calculate_range() is now in/out
parameter. We do not store the slice number in any context (it was only
used to check for collisions and is no longer needed), but we currently
store the slice number in sysdb, so it must be somehow returned from
sss_idmap_calculate_range(). I think that in the future versions of
sysdb, we will store the min/max id values instead of slice numbers (to
support custom ranges), but it is better to be able to obtain the slice
number (right now it is needed for sysdb, but might be needed for
something else in the future).
Thanks
Michal