kern_procctl.c (96244) | kern_procctl.c (96886) |
---|---|
1/* 2 * Copyright (c) 1994, Sean Eric Fagan 3 * 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 --- 14 unchanged lines hidden (view full) --- 23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * | 1/* 2 * Copyright (c) 1994, Sean Eric Fagan 3 * 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 --- 14 unchanged lines hidden (view full) --- 23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * |
31 * $FreeBSD: head/sys/kern/sys_process.c 96244 2002-05-09 04:13:41Z mini $ | 31 * $FreeBSD: head/sys/kern/sys_process.c 96886 2002-05-19 00:14:50Z jhb $ |
32 */ 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/lock.h> 37#include <sys/mutex.h> 38#include <sys/sysproto.h> 39#include <sys/proc.h> --- 343 unchanged lines hidden (view full) --- 383 PROC_LOCK(p); 384 } else { 385 if ((p = pfind(uap->pid)) == NULL) { 386 if (proctree_locked) 387 sx_xunlock(&proctree_lock); 388 return (ESRCH); 389 } 390 } | 32 */ 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/lock.h> 37#include <sys/mutex.h> 38#include <sys/sysproto.h> 39#include <sys/proc.h> --- 343 unchanged lines hidden (view full) --- 383 PROC_LOCK(p); 384 } else { 385 if ((p = pfind(uap->pid)) == NULL) { 386 if (proctree_locked) 387 sx_xunlock(&proctree_lock); 388 return (ESRCH); 389 } 390 } |
391 if (p_cansee(td->td_proc, p)) { | 391 if (p_cansee(td, p)) { |
392 error = ESRCH; 393 goto fail; 394 } 395 | 392 error = ESRCH; 393 goto fail; 394 } 395 |
396 if ((error = p_candebug(td->td_proc, p)) != 0) | 396 if ((error = p_candebug(td, p)) != 0) |
397 goto fail; 398 399 /* 400 * System processes can't be debugged. 401 */ 402 if ((p->p_flag & P_SYSTEM) != 0) { 403 error = EINVAL; 404 goto fail; --- 324 unchanged lines hidden --- | 397 goto fail; 398 399 /* 400 * System processes can't be debugged. 401 */ 402 if ((p->p_flag & P_SYSTEM) != 0) { 403 error = EINVAL; 404 goto fail; --- 324 unchanged lines hidden --- |