summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_process.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-07-20 22:44:39 +0000
committerrwatson <rwatson@FreeBSD.org>2002-07-20 22:44:39 +0000
commitc36591a07cec99c6fae74103429168b938055404 (patch)
treeb3977ab217eb98d31ada5e60cadadb36d4541ba2 /sys/kern/sys_process.c
parent1d6ce2645d4b061648e6cfaa09780a73fcd10020 (diff)
downloadFreeBSD-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/kern/sys_process.c')
-rw-r--r--sys/kern/sys_process.c4
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;
OpenPOWER on IntegriCloud