summaryrefslogtreecommitdiffstats
path: root/lib/libutil
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2013-08-06 22:47:43 +0000
committermillert <millert@openbsd.org>2013-08-06 22:47:43 +0000
commit115e290d0e3b1ec2863e768d95afaaf7752a756c (patch)
treea8575f534aa0e9200542c3c6afbe743e0da4227f /lib/libutil
parentMove the check for template length added in r1.16 outside the !tflag (diff)
downloadwireguard-openbsd-115e290d0e3b1ec2863e768d95afaaf7752a756c.tar.xz
wireguard-openbsd-115e290d0e3b1ec2863e768d95afaaf7752a756c.zip
When writing a new record in pw_copy() print the uid and gid as
unsigned, just like we do the existing records. OK deraadt@
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/passwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libutil/passwd.c b/lib/libutil/passwd.c
index 11ee752e8a4..774dff86e77 100644
--- a/lib/libutil/passwd.c
+++ b/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);