Browse Source

%u for uid/gid; millert ok

OPENBSD_3_2
deraadt 22 years ago
parent
commit
695e261e2d
1 changed files with 7 additions and 6 deletions
  1. +7
    -6
      src/lib/libutil/passwd.c

+ 7
- 6
src/lib/libutil/passwd.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: passwd.c,v 1.34 2002/06/09 22:18:43 fgsch Exp $ */
/* $OpenBSD: passwd.c,v 1.35 2002/06/27 22:21:50 deraadt Exp $ */
/* /*
* Copyright (c) 1987, 1993, 1994, 1995 * Copyright (c) 1987, 1993, 1994, 1995
@ -34,7 +34,7 @@
*/ */
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$OpenBSD: passwd.c,v 1.34 2002/06/09 22:18:43 fgsch Exp $";
static const char rcsid[] = "$OpenBSD: passwd.c,v 1.35 2002/06/27 22:21:50 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#include <sys/types.h> #include <sys/types.h>
@ -483,10 +483,11 @@ pw_copy(ffd, tfd, pw)
goto err; goto err;
continue; continue;
} }
(void)fprintf(to, "%s:%s:%d:%d:%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);
(void)fprintf(to, "%s:%s:%u:%u:%s:%d:%d:%s:%s:%s\n",
pw->pw_name, pw->pw_passwd, (u_int)pw->pw_uid,
(u_int)pw->pw_gid, pw->pw_class, pw->pw_change,
pw->pw_expire, pw->pw_gecos, pw->pw_dir,
pw->pw_shell);
done = 1; done = 1;
if (ferror(to)) if (ferror(to))
goto err; goto err;


Loading…
Cancel
Save