From owner-p4-projects@FreeBSD.ORG Mon Oct 17 19:38:04 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0775916A422; Mon, 17 Oct 2005 19:38:04 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A958F16A41F for ; Mon, 17 Oct 2005 19:38:03 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 712AA43D58 for ; Mon, 17 Oct 2005 19:38:03 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j9HJc350097859 for ; Mon, 17 Oct 2005 19:38:03 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j9HJc3CV097856 for perforce@freebsd.org; Mon, 17 Oct 2005 19:38:03 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 17 Oct 2005 19:38:03 GMT Message-Id: <200510171938.j9HJc3CV097856@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 85462 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 19:38:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=85462 Change 85462 by rwatson@rwatson_peppercorn on 2005/10/17 19:37:34 For kill() and okillpg(), audit the target process (if just one), or the pid if it's a broadcast. Note that we might want to audit okillpg() as AUE_KILL, and if so, we'll need to negate the argument. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/kern/kern_sig.c#7 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/kern/kern_sig.c#7 (text+ko) ==== @@ -1399,12 +1399,14 @@ if ((p = zpfind(uap->pid)) == NULL) return (ESRCH); } + AUDIT_ARG(process, p); error = p_cansignal(td, p, uap->signum); if (error == 0 && uap->signum) psignal(p, uap->signum); PROC_UNLOCK(p); return (error); } + AUDIT_ARG(pid, uap->pid); switch (uap->pid) { case -1: /* broadcast signal */ return (killpg1(td, uap->signum, 0, 1)); @@ -1433,7 +1435,13 @@ register struct okillpg_args *uap; { + /* + * XXXAUDIT: We might want to use AUE_KILL and -uap->pgid instead of + * this here. That would avoid using a non-BSM audit event type + * without losing much information. + */ AUDIT_ARG(signum, uap->signum); + AUDIT_ARG(pid, uap->pgid); if ((u_int)uap->signum > _SIG_MAXSIG) return (EINVAL);