From owner-freebsd-audit Fri Jun 15 23:27:53 2001 Delivered-To: freebsd-audit@freebsd.org Received: from iatl0x01.coxmail.com (iatl1x01.coxmail.com [206.157.231.23]) by hub.freebsd.org (Postfix) with ESMTP id A8DBD37B410; Fri, 15 Jun 2001 23:27:35 -0700 (PDT) (envelope-from mheffner@novacoxmail.com) Received: from enterprise.muriel.penguinpowered.com ([208.138.198.178]) by iatl0x01.coxmail.com (InterMail vK.4.03.02.00 201-232-124 license 85f4f10023be2bd3bce00b3a38363ea2) with ESMTP id <20010616062734.NHDC1034.iatl0x01@enterprise.muriel.penguinpowered.com>; Sat, 16 Jun 2001 02:27:34 -0400 Message-ID: X-Mailer: XFMail 1.4.7 on FreeBSD X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="_=XFMail.1.4.7.FreeBSD:20010616022449:63573=_"; micalg=pgp-md5; protocol="application/pgp-signature" MYHEADER: test Date: Sat, 16 Jun 2001 02:24:49 -0400 (EDT) Reply-To: Mike Heffner From: Mike Heffner To: FreeBSD-audit Subject: Re: bin/15456 usage fix and bug fix Cc: freebsd-gnats-submit@freebsd.org 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.4.7.FreeBSD:20010616022449:63573=_ Content-Type: text/plain; charset=us-ascii Could someone take a quick look at the patch attached. It's to close pr bin/15456, but is slightly different than the patch in the pr. The main difference is the change pid->pidset. It appears this is a bug, because pid can be unitialized and testing against it isn't right. Thanks, Mike -- Mike Heffner Fredericksburg, VA http://filebox.vt.edu/users/mheffner Index: ktrace.1 =================================================================== RCS file: /home/ncvs/src/usr.bin/ktrace/ktrace.1,v retrieving revision 1.9 diff -u -r1.9 ktrace.1 --- ktrace.1 2000/11/20 19:20:51 1.9 +++ ktrace.1 2001/06/16 06:16:50 @@ -42,8 +42,7 @@ .Nm .Op Fl aCcdi .Op Fl f Ar trfile -.Op Fl g Ar pgrp -.Op Fl p Ar pid +.Op Fl g Ar pgrp | Fl p Ar pid .Op Fl t Ar trstr .Nm .Op Fl adi Index: ktrace.c =================================================================== RCS file: /home/ncvs/src/usr.bin/ktrace/ktrace.c,v retrieving revision 1.14 diff -u -r1.14 ktrace.c --- ktrace.c 2000/09/04 06:09:46 1.14 +++ ktrace.c 2001/06/16 06:16:50 @@ -131,7 +131,7 @@ trpoints = ALL_POINTS; pid = 1; } else - ops |= pid ? KTROP_CLEAR : KTROP_CLEARFILE; + ops |= pidset ? KTROP_CLEAR : KTROP_CLEARFILE; if (ktrace(tracefile, ops, trpoints, pid) < 0) err(1, "%s", tracefile); @@ -186,8 +186,8 @@ usage() { (void)fprintf(stderr, "%s\n%s\n", -"usage: ktrace [-aCcid] [-f trfile] [-g pgid] [-p pid] [-t [cnisuv]", -" ktrace [-aCcid] [-f trfile] [-t [cnisuw] command"); +"usage: ktrace [-aCcdi] [-f trfile] [-g pgrp | -p pid] [-t cnisuw]", +" ktrace [-adi] [-f trfile] [-t cnisuw] command"); exit(1); } --_=XFMail.1.4.7.FreeBSD:20010616022449:63573=_ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7KvuxFokZQs3sv5kRAm5bAJ9Fwvrj9n+dkHBfv46zIdy27NG6EgCfaYsf b2v8B7QjZ5s/pWVECHonpME= =yHmY -----END PGP SIGNATURE----- --_=XFMail.1.4.7.FreeBSD:20010616022449:63573=_-- End of MIME message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message