lists.arthurdejong.org
RSS feed

Re: [FIX] nslcd 0.7.x and large gidNumbers

[Date Prev][Date Next] [Thread Prev][Thread Next]

Re: [FIX] nslcd 0.7.x and large gidNumbers



On Fri, 2011-07-01 at 09:00 +0800, Goff, Raal wrote:
> I encountered a problem with nslcd and large gidNumbers. On version
> 0.7.5 (scientific linux 6 and i assume others), large gid's in from
> passwd lookups get truncated, so for a user:
> 
> uid: username
> uidNumber: 1412600003
> gidNumber: 1412600003
> 
> the gidNumber would get truncated to 141260000

Thanks for pointing this out. This will be fixed in the next 0.7 and 0.8
releases. Btw, I would recommend running a more recent version than
0.7.5.

> It looks like the buffer for the gidNumber is too small for the
> number. The attached patch increases the buffer size to allow for
> longer gidNumbers. I'm not sure if there is an actual limit defined
> for gidNumbers, so i made it 15 characters, and it seems to work.

Thanks for the patch. I went over the code to search for similar
buffers. In theory gid_t could be 64 bit which would mean it would need
to contain 20 characters (plus a 0-byte). The new size for these buffers
is 32 bytes which should be enough for everybody. ;)

-- 
-- arthur - arthur@arthurdejong.org - http://arthurdejong.org --
-- 
To unsubscribe send an email to
nss-pam-ldapd-users-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-users