Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/libexec/ftpd Pull up revision 1.97 (requested by itojun):



details:   https://anonhg.NetBSD.org/src/rev/6295ce1e8d27
branches:  netbsd-1-4
changeset: 470761:6295ce1e8d27
user:      he <he%NetBSD.org@localhost>
date:      Sat Jul 08 18:58:10 2000 +0000

description:
Pull up revision 1.97 (requested by itojun):
  Do not use user-supplied data as format string to setproctitle().

diffstat:

 libexec/ftpd/ftpd.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r adaa8efe51d1 -r 6295ce1e8d27 libexec/ftpd/ftpd.c
--- a/libexec/ftpd/ftpd.c       Sat Jul 08 18:53:33 2000 +0000
+++ b/libexec/ftpd/ftpd.c       Sat Jul 08 18:58:10 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftpd.c,v 1.61.2.2 2000/05/11 10:14:37 he Exp $ */
+/*     $NetBSD: ftpd.c,v 1.61.2.3 2000/07/08 18:58:10 he Exp $ */
 
 /*
  * Copyright (c) 1985, 1988, 1990, 1992, 1993, 1994
@@ -44,7 +44,7 @@
 #if 0
 static char sccsid[] = "@(#)ftpd.c     8.5 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: ftpd.c,v 1.61.2.2 2000/05/11 10:14:37 he Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.61.2.3 2000/07/08 18:58:10 he Exp $");
 #endif
 #endif /* not lint */
 
@@ -712,7 +712,7 @@
                    "%s: anonymous/%.*s", remotehost,
                    (int) (sizeof(proctitle) - sizeof(remotehost) -
                    sizeof(": anonymous/")), passwd);
-               setproctitle(proctitle);
+               setproctitle("%s", proctitle);
 #endif /* HASSETPROCTITLE */
                if (logging)
                        syslog(LOG_INFO, "ANONYMOUS FTP LOGIN FROM %s, %s",
@@ -722,7 +722,7 @@
 #ifdef HASSETPROCTITLE
                snprintf(proctitle, sizeof(proctitle),
                    "%s: %s", remotehost, pw->pw_name);
-               setproctitle(proctitle);
+               setproctitle("%s", proctitle);
 #endif /* HASSETPROCTITLE */
                if (logging)
                        syslog(LOG_INFO, "FTP LOGIN FROM %s as %s",
@@ -1507,7 +1507,7 @@
        remotehost[sizeof(remotehost) - 1] = '\0';
 #ifdef HASSETPROCTITLE
        snprintf(proctitle, sizeof(proctitle), "%s: connected", remotehost);
-       setproctitle(proctitle);
+       setproctitle("%s", proctitle);
 #endif /* HASSETPROCTITLE */
 
        if (logging)



Home | Main Index | Thread Index | Old Index