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

Jakub Hrozek jhrozek at redhat.com
Wed Jul 11 06:51:54 UTC 2012


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.



More information about the sssd-devel mailing list