- markus@cvs.openbsd.org 2001/02/28 12:55:07
[channels.c]
unify debug messages
+ - deraadt@cvs.openbsd.org 2001/02/28 17:52:54
+ [misc.c]
+ for completeness, copy pw_gecos too
20010304
- (bal) Remove make-ssh-known-hosts.1 since it's no longer valid.
-/* $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.
*/
#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"
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);