From owner-freebsd-audit Thu Sep 6 20: 1: 9 2001 Delivered-To: freebsd-audit@freebsd.org Received: from lennier.cc.vt.edu (lennier.cc.vt.edu [198.82.162.213]) by hub.freebsd.org (Postfix) with ESMTP id 87F6E37B406 for ; Thu, 6 Sep 2001 20:00:55 -0700 (PDT) Received: from zidane.cc.vt.edu (IDENT:mirapoint@zidane.cc.vt.edu [198.82.161.184]) by lennier.cc.vt.edu (8.11.4/8.11.4) with ESMTP id f8730sw35108 for ; Thu, 6 Sep 2001 23:00:54 -0400 (EDT) Received: from mail.vt.edu (gkar.cc.vt.edu [198.82.161.190]) by zidane.cc.vt.edu (Mirapoint) with ESMTP id ACF57112; Thu, 6 Sep 2001 23:00:41 -0400 (EDT) Received: from enterprise.muriel.penguinpowered.com ([198.82.100.125]) by gkar.cc.vt.edu (Sun Internet Mail Server sims.3.5.2001.05.04.11.50.p10) with ESMTP id <0GJ90080ONUQQQ@gkar.cc.vt.edu> for FreeBSD-audit@freebsd.org; Thu, 6 Sep 2001 20:25:38 -0400 (EDT) Date: Thu, 06 Sep 2001 20:23:21 -0400 (EDT) From: Mike Heffner Subject: ftpd proctitle reporting To: FreeBSD-audit Message-id: MIME-version: 1.0 X-Mailer: XFMail 1.5.0 on FreeBSD Content-type: multipart/signed; boundary="_=XFMail.1.5.0.FreeBSD:20010906202321:8001=_"; micalg=pgp-md5; protocol="application/pgp-signature" X-Priority: 3 (Normal) Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This message is in MIME format --_=XFMail.1.5.0.FreeBSD:20010906202321:8001=_ Content-Type: text/plain; charset=us-ascii Anyone see anything wrong with the following patch? It's something I found while looking over the lukemftpd sources but appears to be in the base sources anyways. The field width doesn't appear to be doing much more than what using snprintf() achieves. It's also incorrect for the VIRTUAL_HOSTING case, so I've decided just to axe it. Index: ftpd.c =================================================================== RCS file: /home/ncvs/src/libexec/ftpd/ftpd.c,v retrieving revision 1.82 diff -u -r1.82 ftpd.c --- ftpd.c 2001/09/02 17:24:19 1.82 +++ ftpd.c 2001/09/07 00:19:01 @@ -1397,15 +1397,12 @@ #ifdef VIRTUAL_HOSTING if (thishost != firsthost) snprintf(proctitle, sizeof(proctitle), - "%s: anonymous(%s)/%.*s", remotehost, hostname, - (int)(sizeof(proctitle) - sizeof(remotehost) - - sizeof(": anonymous/")), passwd); + "%s: anonymous(%s)/%s", remotehost, hostname, + passwd); else #endif snprintf(proctitle, sizeof(proctitle), - "%s: anonymous/%.*s", remotehost, - (int)(sizeof(proctitle) - sizeof(remotehost) - - sizeof(": anonymous/")), passwd); + "%s: anonymous/%s", remotehost, passwd); setproctitle("%s", proctitle); #endif /* SETPROCTITLE */ if (logging) Mike -- Mike Heffner Blacksburg, VA --_=XFMail.1.5.0.FreeBSD:20010906202321:8001=_ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7mBN4FokZQs3sv5kRAhL0AJ9+Qd0lM6ctxlXLLKaILVm79Yg5UQCgjBfD 1ySzQVOGrIpOXUSGghPBf+s= =0axa -----END PGP SIGNATURE----- --_=XFMail.1.5.0.FreeBSD:20010906202321:8001=_-- End of MIME message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message