Yipe. uid and gid were reversed.
[people/mcb30/busybox.git] / libpwdgrp / putpwent.c
index 88dffc9..f6b3a25 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <stdio.h>
 #include <errno.h>
-#include "pwd.h"
+#include "pwd_.h"
 
 int putpwent(const struct passwd *passwd, FILE * f)
 {
@@ -31,7 +31,7 @@ int putpwent(const struct passwd *passwd, FILE * f)
                return -1;
        }
        if (fprintf (f, "%s:%s:%u:%u:%s:%s:%s\n", passwd->pw_name, passwd->pw_passwd,
-                passwd->pw_gid, passwd->pw_uid, passwd->pw_gecos, passwd->pw_dir,
+                passwd->pw_uid, passwd->pw_gid, passwd->pw_gecos, passwd->pw_dir,
                 passwd->pw_shell) < 0)
                return -1;