From b5fa8ad952695f40cd000f5b2364c3d71478636d Mon Sep 17 00:00:00 2001 From: millert <> Date: Tue, 6 Aug 2013 22:47:43 +0000 Subject: [PATCH] When writing a new record in pw_copy() print the uid and gid as unsigned, just like we do the existing records. OK deraadt@ --- src/lib/libutil/passwd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/libutil/passwd.c b/src/lib/libutil/passwd.c index 11ee752e..774dff86 100644 --- a/src/lib/libutil/passwd.c +++ b/src/lib/libutil/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.50 2013/04/29 00:28:23 okan Exp $ */ +/* $OpenBSD: passwd.c,v 1.51 2013/08/06 22:47:43 millert Exp $ */ /* * Copyright (c) 1987, 1993, 1994, 1995 @@ -357,7 +357,7 @@ pw_copy(int ffd, int tfd, const struct passwd *pw, const struct passwd *opw) goto fail; } if (!done) - (void)fprintf(to, "%s:%s:%d:%d:%s:%d:%d:%s:%s:%s\n", + (void)fprintf(to, "%s:%s:%u:%u:%s:%d:%d:%s:%s:%s\n", pw->pw_name, pw->pw_passwd, pw->pw_uid, pw->pw_gid, pw->pw_class, pw->pw_change, pw->pw_expire, pw->pw_gecos, pw->pw_dir, pw->pw_shell);