Date: Thu, 06 Sep 2001 20:23:21 -0400 (EDT) From: Mike Heffner <mheffner@vt.edu> To: FreeBSD-audit <FreeBSD-audit@freebsd.org> Subject: ftpd proctitle reporting Message-ID: <XFMail.20010906202321.mheffner@vt.edu>
next in thread | raw e-mail | index | archive | help
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 <mheffner@[acm.]vt.edu> Blacksburg, VA <mikeh@FreeBSD.org> --_=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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20010906202321.mheffner>