lists.arthurdejong.org
RSS feed

Re: uidNumber: out of range

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

Re: uidNumber: out of range



hello,
Ok, We will see with the ldap administrator, I hope it is possible...
Thanks you very much
Regards,
Laurent

Le 20/06/2014 16:37, Arthur de Jong a écrit :
On Fri, 2014-06-20 at 15:53 +0200, Laurent Mistai wrote:
the result of the ldapsearch : 
uidNumber: 4295023917
gidNumber: 4295023917
The problem here is that this number will not fit in a 32 bit integer
(the size of uid_t). Also strtoul(), which is used to parse the number,
does not support these large values.

I think the 0.7 version ended up truncating the integer to 56621 (the
lower 32 bits of the above number) but this may cause lookup problems
for getting the user by numeric id (getent passwd 56621).

All in all, the best approach would be to fix the directory to return
numeric values in range.

If you really want the old behaviour back, the easiest way to patch
nss-pam-ldapd to ignore range checking is to add the following lines to
nslcd/common.h right before
"#ifdef WANT_STRTOUI":

#undef strtouid
#define strtouid (uid_t)strtoull
#undef strtogid
#define strtogid (gid_t)strtoull
#undef WANT_STRTOUI

(untested though)




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