From owner-p4-projects@FreeBSD.ORG Mon Jan 17 12:01:44 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0362716A4D1; Mon, 17 Jan 2005 12:01:44 +0000 (GMT) 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 CC46B16A4CE for ; Mon, 17 Jan 2005 12:01:43 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B238F43D49 for ; Mon, 17 Jan 2005 12:01:43 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j0HC1hEh046294 for ; Mon, 17 Jan 2005 12:01:43 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0HC1hch046291 for perforce@freebsd.org; Mon, 17 Jan 2005 12:01:43 GMT (envelope-from wsalamon@computer.org) Date: Mon, 17 Jan 2005 12:01:43 GMT Message-Id: <200501171201.j0HC1hch046291@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wsalamon@computer.org using -f From: Wayne Salamon To: Perforce Change Reviews Subject: PERFORCE change 69161 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2005 12:01:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=69161 Change 69161 by wsalamon@rickenbacker on 2005/01/17 12:01:06 Change the audit_sysclose(0 function to take the thread pointer instead of the proc pointer. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/bsm/audit_kernel.h#11 edit .. //depot/projects/trustedbsd/audit3/sys/kern/kern_descrip.c#4 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#15 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/bsm/audit_kernel.h#11 (text+ko) ==== @@ -319,7 +319,7 @@ void audit_arg_auditon(union auditon_udata *udata); void audit_arg_file(struct proc *p, struct file *fp); -void audit_sysclose(struct proc *p, int fd); +void audit_sysclose(struct thread *td, int fd); void audit_proc_alloc(struct proc *p); void audit_proc_kproc0(struct proc *p); @@ -357,9 +357,9 @@ /* * A Macro to wrap the audit_sysclose() function. */ -#define AUDIT_SYSCLOSE(p, fd) do { \ +#define AUDIT_SYSCLOSE(td, fd) do { \ if (audit_enabled) \ - audit_sysclose(p, fd); \ + audit_sysclose(td, fd); \ } while (0) #else /* !AUDIT */ ==== //depot/projects/trustedbsd/audit3/sys/kern/kern_descrip.c#4 (text+ko) ==== @@ -972,7 +972,7 @@ /* The call to AUDIT_SYSCLOSE must be made with Giant held, * but without the fd lock. */ - AUDIT_SYSCLOSE(td->td_proc, fd); + AUDIT_SYSCLOSE(td, fd); FILEDESC_LOCK(fdp); if ((unsigned)fd >= fdp->fd_nfiles || ==== //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#15 (text+ko) ==== @@ -2142,13 +2142,13 @@ * within the system call itself. */ void -audit_sysclose(struct proc *p, int fd) +audit_sysclose(struct thread *td, int fd) { struct file *fp; audit_arg_fd(fd); - if (getvnode(p->p_fd, fd, &fp) != 0) + if (getvnode(td->td_proc->p_fd, fd, &fp) != 0) return; audit_arg_vnpath((struct vnode *)fp->f_data, ARG_VNODE1);