bug 1046 (patch from Bostjan Golob <golob@gimb.org>); fix 20 month old bug where...
authorGerald Carter <jerry@samba.org>
Mon, 9 Feb 2004 18:47:19 +0000 (18:47 +0000)
committerGerald Carter <jerry@samba.org>
Mon, 9 Feb 2004 18:47:19 +0000 (18:47 +0000)
source/lib/util_getent.c

index 32641dbf83b100f601622eefbb53dde32bb02eb0..3544c1678cca05b16a9bfe5e0f8e077978e45c46 100644 (file)
@@ -156,15 +156,15 @@ struct sys_pwent * getpwent_list(void)
                pent->pw_uid = pwd->pw_uid;
                pent->pw_gid = pwd->pw_gid;
                if (pwd->pw_gecos) {
-                       if ((pent->pw_name = strdup(pwd->pw_gecos)) == NULL)
+                       if ((pent->pw_gecos = strdup(pwd->pw_gecos)) == NULL)
                                goto err;
                }
                if (pwd->pw_dir) {
-                       if ((pent->pw_name = strdup(pwd->pw_dir)) == NULL)
+                       if ((pent->pw_dir = strdup(pwd->pw_dir)) == NULL)
                                goto err;
                }
                if (pwd->pw_shell) {
-                       if ((pent->pw_name = strdup(pwd->pw_shell)) == NULL)
+                       if ((pent->pw_shell = strdup(pwd->pw_shell)) == NULL)
                                goto err;
                }