kern_ktrace.c (94861) | kern_ktrace.c (96886) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93 | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93 |
34 * $FreeBSD: head/sys/kern/kern_ktrace.c 94861 2002-04-16 17:11:34Z jhb $ | 34 * $FreeBSD: head/sys/kern/kern_ktrace.c 96886 2002-05-19 00:14:50Z jhb $ |
35 */ 36 37#include "opt_ktrace.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/lock.h> 42#include <sys/mutex.h> --- 574 unchanged lines hidden (view full) --- 617 struct proc *targetp; 618{ 619 620 PROC_LOCK_ASSERT(targetp, MA_OWNED); 621 if (targetp->p_traceflag & KTRFAC_ROOT && 622 suser_cred(td->td_ucred, PRISON_ROOT)) 623 return (0); 624 | 35 */ 36 37#include "opt_ktrace.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/lock.h> 42#include <sys/mutex.h> --- 574 unchanged lines hidden (view full) --- 617 struct proc *targetp; 618{ 619 620 PROC_LOCK_ASSERT(targetp, MA_OWNED); 621 if (targetp->p_traceflag & KTRFAC_ROOT && 622 suser_cred(td->td_ucred, PRISON_ROOT)) 623 return (0); 624 |
625 if (p_candebug(td->td_proc, targetp) != 0) | 625 if (p_candebug(td, targetp) != 0) |
626 return (0); 627 628 return (1); 629} 630 631#endif /* KTRACE */ | 626 return (0); 627 628 return (1); 629} 630 631#endif /* KTRACE */ |