From 24411f6f435ea431230a0ce4d62b6e8c4a67208e Mon Sep 17 00:00:00 2001 From: Philip Guenthe Date: Wed, 14 Dec 2011 07:32:17 +0000 Subject: Handle rthreads consistently in ktrace by moving the flags and vnode into struct process; KTRFAC_ACTIVE becomes P_INKTR. Also, save the credentials used to open the file in sys_ktrace() and use them for all writes to the vnode. much feedback and ok jsing@ --- sys/kern/kern_sysctl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/kern/kern_sysctl.c') diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 4e964d0008c..478ee32e2ca 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.209 2011/12/09 16:14:54 nicm Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.210 2011/12/14 07:32:16 guenther Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -1291,8 +1291,8 @@ sysctl_file2(int *name, u_int namelen, char *where, size_t *sizep, FILLIT(NULL, NULL, KERN_FILE_CDIR, fdp->fd_cdir, pp); if (fdp->fd_rdir) FILLIT(NULL, NULL, KERN_FILE_RDIR, fdp->fd_rdir, pp); - if (pp->p_tracep) - FILLIT(NULL, NULL, KERN_FILE_TRACE, pp->p_tracep, pp); + if (pp->p_p->ps_tracevp) + FILLIT(NULL, NULL, KERN_FILE_TRACE, pp->p_p->ps_tracevp, pp); for (i = 0; i < fdp->fd_nfiles; i++) { if ((fp = fdp->fd_ofiles[i]) == NULL) continue; @@ -1317,8 +1317,8 @@ sysctl_file2(int *name, u_int namelen, char *where, size_t *sizep, FILLIT(NULL, NULL, KERN_FILE_CDIR, fdp->fd_cdir, pp); if (fdp->fd_rdir) FILLIT(NULL, NULL, KERN_FILE_RDIR, fdp->fd_rdir, pp); - if (pp->p_tracep) - FILLIT(NULL, NULL, KERN_FILE_TRACE, pp->p_tracep, pp); + if (pp->p_p->ps_tracevp) + FILLIT(NULL, NULL, KERN_FILE_TRACE, pp->p_p->ps_tracevp, pp); for (i = 0; i < fdp->fd_nfiles; i++) { if ((fp = fdp->fd_ofiles[i]) == NULL) continue; -- cgit v1.2.3