summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2009-03-16 17:03:33 +0000
committerRobert Watson <rwatson@FreeBSD.org>2009-03-16 17:03:33 +0000
commit74e8eb600aa5cc4a39a5b38befec7c6697c3eedd (patch)
tree13ff3a039a226b95024ea1b5ca77102a79ef0659
parent6cfa291acc8b175281f961df3551569fcf5eea72 (diff)
Notes
-rw-r--r--sys/kern/kern_proc.c4
-rw-r--r--sys/security/audit/audit_syscalls.c20
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 609af903eb76..3160eb368fa1 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -994,10 +994,10 @@ sysctl_out_proc(struct proc *p, struct sysctl_req *req, int flags)
np = pfind(pid);
}
if (np == NULL)
- return EAGAIN;
+ return (ESRCH);
if (np != p) {
PROC_UNLOCK(np);
- return EAGAIN;
+ return (ESRCH);
}
PROC_UNLOCK(np);
return (0);
diff --git a/sys/security/audit/audit_syscalls.c b/sys/security/audit/audit_syscalls.c
index 17bc7c2cb74b..0621d0f84357 100644
--- a/sys/security/audit/audit_syscalls.c
+++ b/sys/security/audit/audit_syscalls.c
@@ -314,12 +314,12 @@ auditon(struct thread *td, struct auditon_args *uap)
case A_GETPINFO:
if (udata.au_aupinfo.ap_pid < 1)
- return (EINVAL);
+ return (ESRCH);
if ((tp = pfind(udata.au_aupinfo.ap_pid)) == NULL)
- return (EINVAL);
- if (p_cansee(td, tp) != 0) {
+ return (ESRCH);
+ if ((error = p_cansee(td, tp)) != 0) {
PROC_UNLOCK(tp);
- return (EINVAL);
+ return (error);
}
cred = tp->p_ucred;
if (cred->cr_audit.ai_termid.at_type == AU_IPv6) {
@@ -341,16 +341,16 @@ auditon(struct thread *td, struct auditon_args *uap)
case A_SETPMASK:
if (udata.au_aupinfo.ap_pid < 1)
- return (EINVAL);
+ return (ESRCH);
newcred = crget();
if ((tp = pfind(udata.au_aupinfo.ap_pid)) == NULL) {
crfree(newcred);
- return (EINVAL);
+ return (ESRCH);
}
- if (p_cansee(td, tp) != 0) {
+ if ((error = p_cansee(td, tp)) != 0) {
PROC_UNLOCK(tp);
crfree(newcred);
- return (EINVAL);
+ return (error);
}
oldcred = tp->p_ucred;
crcopy(newcred, oldcred);
@@ -377,9 +377,9 @@ auditon(struct thread *td, struct auditon_args *uap)
case A_GETPINFO_ADDR:
if (udata.au_aupinfo_addr.ap_pid < 1)
- return (EINVAL);
+ return (ESRCH);
if ((tp = pfind(udata.au_aupinfo_addr.ap_pid)) == NULL)
- return (EINVAL);
+ return (ESRCH);
cred = tp->p_ucred;
udata.au_aupinfo_addr.ap_auid = cred->cr_audit.ai_auid;
udata.au_aupinfo_addr.ap_mask.am_success =