[Freeipa-devel] [PATCH] Check for valid ID ranges and ID overlaps between domains

Stephen Gallagher sgallagh at redhat.com
Mon May 11 17:23:46 UTC 2009


On 05/11/2009 12:43 PM, Jakub Hrozek wrote:
> On Tue, 2009-05-05 at 08:43 -0400, Simo Sorce wrote:
>> nack
>>
>> We do not require to always set id ranges, they are optional and more
>> a
>> filter than anything else.
>> At most overlapping ranges should give a warning, and absence of
>> ranges
>> in a domain is fine too.
> 
> OK, a new incarnation of the patch that just prints a DEBUG(1, ..) is
> attached. 
> 
>> Second I don't get the utility of the double while loop in that
>> function, what's for ?
> 
> Since the domain limits are pretty arbitrary and not sorted in any way,
> compares the first domain with all others starting with the next
> (=second), then second domain with all others starting with the next
> (=third), ..
> 
> I think that adds up to (n^2)/2 cycles for n domains.
> 
> Jakub
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel

Nack. If a domain has an invalid range specified, it should be an error,
not a warning. (e.g. id_min >= id_max, id_min or id_max < 0, etc.)

Also, I'd prefer if you used a variable name other than "first" for the
outer loop. It gives the impression that you're always comparing against
the first domain in the list.

-- 
Stephen Gallagher
RHCE 804006346421761

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3258 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090511/d63ecd50/attachment.p7s>


More information about the Freeipa-devel mailing list