mirror of
https://github.com/samba-team/samba.git
synced 2025-12-02 00:23:50 +03:00
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 commit is contained in:
@@ -156,15 +156,15 @@ struct sys_pwent * getpwent_list(void)
|
|||||||
pent->pw_uid = pwd->pw_uid;
|
pent->pw_uid = pwd->pw_uid;
|
||||||
pent->pw_gid = pwd->pw_gid;
|
pent->pw_gid = pwd->pw_gid;
|
||||||
if (pwd->pw_gecos) {
|
if (pwd->pw_gecos) {
|
||||||
if ((pent->pw_name = strdup(pwd->pw_gecos)) == NULL)
|
if ((pent->pw_gecos = strdup(pwd->pw_gecos)) == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (pwd->pw_dir) {
|
if (pwd->pw_dir) {
|
||||||
if ((pent->pw_name = strdup(pwd->pw_dir)) == NULL)
|
if ((pent->pw_dir = strdup(pwd->pw_dir)) == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (pwd->pw_shell) {
|
if (pwd->pw_shell) {
|
||||||
if ((pent->pw_name = strdup(pwd->pw_shell)) == NULL)
|
if ((pent->pw_shell = strdup(pwd->pw_shell)) == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user