summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-02-09 18:43:57 +0000
committerGerald Carter <jerry@samba.org>2004-02-09 18:43:57 +0000
commit7da2745bdd290f5e031eb81dcf26593ed4a8cb42 (patch)
tree901c900d79498b3bf137e4d98ce1bdf8e57d04d4 /source3/lib
parent6268f1bdbc3e12195c1a95f687304fe179addfe8 (diff)
downloadsamba-7da2745bdd290f5e031eb81dcf26593ed4a8cb42.tar.gz
samba-7da2745bdd290f5e031eb81dcf26593ed4a8cb42.tar.bz2
samba-7da2745bdd290f5e031eb81dcf26593ed4a8cb42.zip
bug 1046 (patch from Bostjan Golob <golob@gimb.org>); fix 20 month old bug where getpwent_list() was overoverwriting the username for entries. However the code path to the bug was introduced only on January 25
(This used to be commit ec346adf34bd2bc1d514202e82b3713fb5b032ab)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_getent.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/util_getent.c b/source3/lib/util_getent.c
index 32641dbf83..3544c1678c 100644
--- a/source3/lib/util_getent.c
+++ b/source3/lib/util_getent.c
@@ -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;
}