diff options
author | rwatson <rwatson@FreeBSD.org> | 2002-07-20 22:44:39 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2002-07-20 22:44:39 +0000 |
commit | c36591a07cec99c6fae74103429168b938055404 (patch) | |
tree | b3977ab217eb98d31ada5e60cadadb36d4541ba2 /sys | |
parent | 1d6ce2645d4b061648e6cfaa09780a73fcd10020 (diff) | |
download | FreeBSD-src-c36591a07cec99c6fae74103429168b938055404.zip FreeBSD-src-c36591a07cec99c6fae74103429168b938055404.tar.gz |
Do preserve the error result from calling p_cansee() and use that when
failing because of the error.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/sys_process.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index c8cf8c4..54b2423 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -392,10 +392,8 @@ ptrace(struct thread *td, struct ptrace_args *uap) return (ESRCH); } } - if (p_cansee(td, p)) { - error = ESRCH; + if ((error = p_cansee(td, p)) != 0) goto fail; - } if ((error = p_candebug(td, p)) != 0) goto fail; |