diff options
author | Rich Felker <dalias@aerifal.cx> | 2019-05-16 17:12:56 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2019-05-16 17:19:03 -0400 |
commit | 9fd98a6354105dd67b648b48dba238f4c3e3d564 (patch) | |
tree | 80dc8a692de9cfef36f68669606e3faa65cd46b3 /src/passwd/putpwent.c | |
parent | f450c150d31730b18a145cca17150427cf3f20e6 (diff) | |
download | musl-9fd98a6354105dd67b648b48dba238f4c3e3d564.tar.gz musl-9fd98a6354105dd67b648b48dba238f4c3e3d564.tar.bz2 musl-9fd98a6354105dd67b648b48dba238f4c3e3d564.tar.xz musl-9fd98a6354105dd67b648b48dba238f4c3e3d564.zip |
fix format strings for uid/gid values in putpwent/putgrent
commit 648c3b4e18b2ce2b6af7d44783e42ca267ea49f5 omitted this change,
which is needed to be able to use uid/gid values greater than INT_MAX
with these interfaces. it fixes alpine linux bug #10460.
Diffstat (limited to 'src/passwd/putpwent.c')
-rw-r--r-- | src/passwd/putpwent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passwd/putpwent.c b/src/passwd/putpwent.c index 3a02e573..312b7653 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; } |