[Samba] idmap_hash SID mapping limit
Gustavo De Nardin (spuk)
gustavodn at gmail.com
Mon Jun 4 10:27:24 MDT 2012
hash_rid() in idmap_hash.c has a comment saying the rid is hashed
to 20 bit for supporting 100K SIDs:
66 static uint32_t hash_rid(uint32_t rid)
68 /* 20 bits for the rid which allows us to support
69 the first 100K users/groups in a domain */
71 return (rid & 0x0007FFFF);
But 0x7FFFF is 19 bit, and also wouldn't 20 bit allow for 1M SIDs
(2^20), not just 100K? Even if it is 19 bit that should support 512K.
I haven't read the whole source and codepath so I guess I can be
easily missing something, but could someone clarify and confirm what
the limit is?
More information about the samba