[PATCH] idmap autorid extension to support rid greater than rangesize

Michael Adam obnox at samba.org
Tue Apr 2 14:41:18 MDT 2013


Hi Abhidnya,

I started looking at the patch.
While it is not large, it is subtle, and the change
potentially dangerous, so I want to review carefully.
I'll come back with comments later.

Cheers - Michael

On 2013-04-02 at 16:08 +0530, Abhidnya S Joshi wrote:
> Hi,
> 
> Please find attached patch for multiple range support in autorid idmap 
> module. This patch applies to master branch. 
> The autorid man page says:
> "SIDs with RIDs larger than rangesize cannot be mapped, are ignored and 
> the corresponding map is discarded. Choose this value carefully, as this 
> should not be changed after the first ranges for domains have been 
> defined, otherwise mappings between domains will get intermixed leading to 
> unpredictable results. As the parameter cannot be changed later, please 
> plan accordingly for your expected number of users in a domain with safety 
> margins."
> 
> In production environment, it sometimes becomes difficult to plan max rid 
> in advance and thus rangesize. With this patch, autorid module will be 
> able to support rids larger than rangesize.(Provided range is available)
> 
> e.g. The existing method is ID = IDMAP UID LOW VALUE + DOMAINRANGENUMBER * 
> RANGESIZE + RID
> 
> This patch will use ID = IDMAP UID LOW VALUE + DOMAINRANGENUMBER * 
> RANGESIZE + RID – ( MULTIPLIER * RANGESIZE)
> where Multiplier is an unsigned integer  which defines the number of 
> ranges to skip while allocating a range. It is calculated by dividing 
> incoming RID with RangeSize.
> 
> Note: This is just extension to autorid and will not hanmper existing 
> functionality
> 
> 
> 
> Thanks and Regards
> Abhidnya Joshi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130402/e457f182/attachment.pgp>


More information about the samba-technical mailing list