[SSSD] [PATCH] Cast uid_t to unsigned long long in DEBUG messages

Stephen Gallagher sgallagh at redhat.com
Wed Jul 11 13:02:58 UTC 2012


On Wed, 2012-07-11 at 08:51 +0200, Jakub Hrozek wrote:
> On Tue, Jul 10, 2012 at 04:37:20PM +0200, Jan Engelhardt wrote:
> > 
> > On Tuesday 2012-07-10 15:21, Jakub Hrozek wrote:
> > 
> > >krb5_child was crashing on my 32bit system when debugging was enabled
> > >(and to make it more interesting, only when compiled with -O2). We were
> > >using %llu to print uid_t values, which didn't match with the real size
> > >of uid_t on 32bit systems. This patch adds an explicit cast to unsigned
> > >long long.
> > 
> > unsigned long would be enough, since that is 32-bit even on the oldest
> > DOS platforms.
> 
> Yes, I think you're right, for the record unsigned long is also what id(1)
> from coreutils uses. I've used unsigned long long mainly because that's
> what's used elsewhere in the SSSD.

IIRC, we were trying to be over-protective there because there may exist
platforms out there now (or in the near future) that allow for a 64-bit
ID value.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120711/dbbc6f50/attachment.sig>


More information about the sssd-devel mailing list