Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ftpd Clear utmpx struct before writing it to wtmpx f...
details: https://anonhg.NetBSD.org/src/rev/025f0feecf99
branches: trunk
changeset: 339773:025f0feecf99
user: shm <shm%NetBSD.org@localhost>
date: Sun Aug 09 12:17:30 2015 +0000
description:
Clear utmpx struct before writing it to wtmpx files
diffstat:
libexec/ftpd/logwtmp.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 15b556c5acf2 -r 025f0feecf99 libexec/ftpd/logwtmp.c
--- a/libexec/ftpd/logwtmp.c Sun Aug 09 10:09:07 2015 +0000
+++ b/libexec/ftpd/logwtmp.c Sun Aug 09 12:17:30 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: logwtmp.c,v 1.25 2006/09/23 16:03:50 xtraeme Exp $ */
+/* $NetBSD: logwtmp.c,v 1.26 2015/08/09 12:17:30 shm Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -36,7 +36,7 @@
#if 0
static char sccsid[] = "@(#)logwtmp.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: logwtmp.c,v 1.25 2006/09/23 16:03:50 xtraeme Exp $");
+__RCSID("$NetBSD: logwtmp.c,v 1.26 2015/08/09 12:17:30 shm Exp $");
#endif
#endif /* not lint */
@@ -124,6 +124,7 @@
if (fdx < 0)
return;
if (fstat(fdx, &buf) == 0) {
+ (void)memset(&ut, 0, sizeof(ut));
(void)strncpy(ut.ut_line, line, sizeof(ut.ut_line));
(void)strncpy(ut.ut_name, name, sizeof(ut.ut_name));
(void)strncpy(ut.ut_host, host, sizeof(ut.ut_host));
Home |
Main Index |
Thread Index |
Old Index