Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3-0]: src/libexec/ftpd Pull up following revision(s) (requested b...
details: https://anonhg.NetBSD.org/src/rev/73ff70c65ef1
branches: netbsd-3-0
changeset: 579498:73ff70c65ef1
user: bouyer <bouyer%NetBSD.org@localhost>
date: Thu Sep 18 19:12:08 2008 +0000
description:
Pull up following revision(s) (requested by lukem in ticket #1958):
libexec/ftpd/ftpd.c: revision 1.169
logxfer(): don't use the same buffer to store the results of two separate
concurrent realpath(3)s, otherwise we'll log the wrong information
for a rename.
Noted by Dmitry Sivachenko in private mail.
diffstat:
libexec/ftpd/ftpd.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (41 lines):
diff -r c905a967871a -r 73ff70c65ef1 libexec/ftpd/ftpd.c
--- a/libexec/ftpd/ftpd.c Fri Aug 29 20:39:26 2008 +0000
+++ b/libexec/ftpd/ftpd.c Thu Sep 18 19:12:08 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftpd.c,v 1.164.2.1 2005/07/05 21:48:49 tron Exp $ */
+/* $NetBSD: ftpd.c,v 1.164.2.1.2.1 2008/09/18 19:12:08 bouyer Exp $ */
/*
* Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
#if 0
static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: ftpd.c,v 1.164.2.1 2005/07/05 21:48:49 tron Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.164.2.1.2.1 2008/09/18 19:12:08 bouyer Exp $");
#endif
#endif /* not lint */
@@ -3321,7 +3321,8 @@
logxfer(const char *command, off_t bytes, const char *file1, const char *file2,
const struct timeval *elapsed, const char *error)
{
- char buf[MAXPATHLEN * 2 + 100], realfile[MAXPATHLEN];
+ char buf[MAXPATHLEN * 2 + 100];
+ char realfile1[MAXPATHLEN], realfile2[MAXPATHLEN];
const char *r1, *r2;
char direction;
size_t len;
@@ -3331,10 +3332,10 @@
return;
r1 = r2 = NULL;
- if ((r1 = realpath(file1, realfile)) == NULL)
+ if ((r1 = realpath(file1, realfile1)) == NULL)
r1 = file1;
if (file2 != NULL)
- if ((r2 = realpath(file2, realfile)) == NULL)
+ if ((r2 = realpath(file2, realfile2)) == NULL)
r2 = file2;
/*
Home |
Main Index |
Thread Index |
Old Index