diff --git a/src/passwd/putgrent.c b/src/passwd/putgrent.c index a0b320fc32692bc244d40f0c0191f8d94eefb388..2a8257dc9c2dfb0e8a41c4cd98a698a6cc42aad5 100644 --- a/src/passwd/putgrent.c +++ b/src/passwd/putgrent.c @@ -7,7 +7,7 @@ int putgrent(const struct group *gr, FILE *f) int r; size_t i; flockfile(f); - if ((r = fprintf(f, "%s:%s:%d:", gr->gr_name, gr->gr_passwd, gr->gr_gid))<0) goto done; + if ((r = fprintf(f, "%s:%s:%u:", gr->gr_name, gr->gr_passwd, gr->gr_gid))<0) goto done; if (gr->gr_mem) for (i=0; gr->gr_mem[i]; i++) if ((r = fprintf(f, "%s%s", i?",":"", gr->gr_mem[i]))<0) goto done; r = fputc('\n', f); diff --git a/src/passwd/putpwent.c b/src/passwd/putpwent.c index 3a02e5730482044d56e1458b26360fefa3f85541..312b76530254d14b246ca1fc5972096c3f53ba65 100644 --- a/src/passwd/putpwent.c +++ b/src/passwd/putpwent.c @@ -4,7 +4,7 @@ int putpwent(const struct passwd *pw, FILE *f) { - return fprintf(f, "%s:%s:%d:%d:%s:%s:%s\n", + return fprintf(f, "%s:%s:%u:%u:%s:%s:%s\n", pw->pw_name, pw->pw_passwd, pw->pw_uid, pw->pw_gid, pw->pw_gecos, pw->pw_dir, pw->pw_shell)<0 ? -1 : 0; }