diff --git a/src/groupmod.c b/src/groupmod.c index 828c7c0b..7802e5b1 100644 --- a/src/groupmod.c +++ b/src/groupmod.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #ifdef ACCT_TOOLS_SETUID @@ -574,8 +575,7 @@ static void prepare_failure_reports (void) (void) snprintf (info_group.action, 512 - strlen (info_group.audit_msg), - "group %s/%lu", - group_name, (unsigned long int) group_id); + "group %s/%ju", group_name, (uintmax_t) group_id); #ifdef SHADOWGRP (void) snprintf (info_gshadow.action, 512 - strlen (info_group.audit_msg), @@ -583,8 +583,7 @@ static void prepare_failure_reports (void) #endif (void) snprintf (info_passwd.action, 512 - strlen (info_group.audit_msg), - "group %s/%lu", - group_name, (unsigned long int) group_id); + "group %s/%ju", group_name, (uintmax_t) group_id); if (nflg) { strncat (info_group.action, ", new name: ", @@ -618,13 +617,13 @@ static void prepare_failure_reports (void) 511 - strlen (info_group.audit_msg)); (void) snprintf (info_group.action+strlen (info_group.action), 512 - strlen (info_group.audit_msg), - "%lu", (unsigned long int) group_newid); + "%ju", (uintmax_t) group_newid); strncat (info_passwd.action, ", new gid: ", 511 - strlen (info_passwd.audit_msg)); (void) snprintf (info_passwd.action+strlen (info_passwd.action), 512 - strlen (info_passwd.audit_msg), - "%lu", (unsigned long int) group_newid); + "%ju", (uintmax_t) group_newid); } info_group.audit_msg[511] = '\0'; #ifdef SHADOWGRP