While looking at another issue I realized that we used a wrong
formatting conversion for UID/GID values - %d. For very large values,
there were sometimes overflows (-1) in the DEBUG logs. The attached
patch converts the format specifier to PRIu32 as the value we print is
uint32_t.
I'm fine with pushing this patch atop Nikolai's patches so that we don't
make him rebase the large patchset again.