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.
On Tue, 2012-07-10 at 15:21 +0200, 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
Ack
On Tue, 2012-07-10 at 09:30 -0400, Stephen Gallagher wrote:
On Tue, 2012-07-10 at 15:21 +0200, 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
Ack
Pushed to master.
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.
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.
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.
sssd-devel@lists.fedorahosted.org