[SSSD] [PATCH] Use unsigned long for conversion to id_t (sssd 1.2 only)

Sumit Bose sbose at redhat.com
Wed Oct 20 05:55:35 UTC 2010


On Tue, Oct 19, 2010 at 04:28:09PM -0400, Simo Sorce wrote:
> On Tue, 19 Oct 2010 16:06:22 -0400
> Stephen Gallagher <sgallagh at redhat.com> wrote:
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > On 10/18/2010 03:16 PM, Jakub Hrozek wrote:
> > > We used strtol() on a number of places to convert into uid_t or
> > > gid_t from a string representation such as LDAP attribute, but on
> > > some platforms, unsigned long might be necessary to store big id_t
> > > values.
> > > 
> > > This patch converts to using strtoul() instead.
> > 
> > 
> > It has been discovered that LDAP only supports signed 32-bit integers
> > for the UID, so there is no need for this patch. No sense in
> > backporting it, in that case.
> 
> This doesn't sound right.
> 
> >From RFC 4517:
> 
> 3.3.16.  Integer
> 
>    A value of the Integer syntax is a whole number of unlimited
>    magnitude. [..]
> 
> 
> Simo.

I agree and additionally, ldap_user_uid_number can be used to read the
UID from any other attribute where larger numbers are supported.

bye,
Sumit

> 
> -- 
> Simo Sorce * Red Hat, Inc * New York
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/sssd-devel



More information about the sssd-devel mailing list