[SSSD] [PATCH] Use unsigned long for conversion to id_t
Jakub Hrozek
jhrozek at redhat.com
Mon Oct 18 16:08:38 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/18/2010 05:40 PM, Stephen Gallagher wrote:
> On 10/18/2010 10:25 AM, 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.
>
>> Fixes: #650
>
>
> Nack. Throws a new warning:
>
> cc1: warnings being treated as errors
> ../src/util/find_uid.c: In function get_uid_from_pid:
> ../src/util/find_uid.c:146: error: comparison of unsigned expression < 0
> is always false
>
>
Thanks for catching that. Updated patch attached.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAky8cQYACgkQHsardTLnvCXllQCeKf7zgbxkAbrAYDr9VjKjK79f
dw4AoKlx0MRDOc++tfUkGCUkG3jHc/k+
=CbHv
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-unsigned-long-for-conversion-to-id_t.patch
Type: text/x-patch
Size: 7236 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20101018/59a89e6c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-unsigned-long-for-conversion-to-id_t.patch.sig
Type: application/pgp-signature
Size: 72 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20101018/59a89e6c/attachment.sig>
More information about the sssd-devel
mailing list