diff options
author | mouring <mouring> | 2001-03-05 06:22:01 +0000 |
---|---|---|
committer | mouring <mouring> | 2001-03-05 06:22:01 +0000 |
commit | d584009aaa23010c83adab621e1c07ad7309f3a1 (patch) | |
tree | 28c46812a7cb9b1f1d54e6a5f14544797d12ff3a /misc.c | |
parent | 868c833037ae257d912635bd761dcdcc80018ee5 (diff) | |
download | openssh-d584009aaa23010c83adab621e1c07ad7309f3a1.tar.gz |
- deraadt@cvs.openbsd.org 2001/02/28 17:52:54
[misc.c]
for completeness, copy pw_gecos too
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.3 2001/02/28 05:34:28 deraadt Exp $ */ +/* $OpenBSD: misc.c,v 1.4 2001/02/28 17:52:54 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -25,7 +25,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: misc.c,v 1.3 2001/02/28 05:34:28 deraadt Exp $"); +RCSID("$OpenBSD: misc.c,v 1.4 2001/02/28 17:52:54 deraadt Exp $"); #include "misc.h" #include "log.h" @@ -101,9 +101,11 @@ struct passwd * pwcopy(struct passwd *pw) { struct passwd *copy = xmalloc(sizeof(*copy)); + memset(copy, 0, sizeof(*copy)); copy->pw_name = xstrdup(pw->pw_name); copy->pw_passwd = xstrdup(pw->pw_passwd); + copy->pw_gecos = xstrdup(pw->pw_gecos); copy->pw_uid = pw->pw_uid; copy->pw_gid = pw->pw_gid; copy->pw_class = xstrdup(pw->pw_class); |