Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178315721
D40628.1796487133.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D40628.1796487133.diff
View Options
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1471,11 +1471,7 @@
if ((error = mac_cred_check_visible(u1, u2)))
return (error);
#endif
- if ((error = cr_canseeotheruids(u1, u2)))
- return (error);
- if ((error = cr_canseeothergids(u1, u2)))
- return (error);
- if ((error = cr_canseejailproc(u1, u2)))
+ if ((error = cr_bsd_visible(u1, u2)))
return (error);
return (0);
}
@@ -1536,9 +1532,7 @@
if ((error = mac_proc_check_signal(cred, proc, signum)))
return (error);
#endif
- if ((error = cr_canseeotheruids(cred, proc->p_ucred)))
- return (error);
- if ((error = cr_canseeothergids(cred, proc->p_ucred)))
+ if ((error = cr_bsd_visible(cred, proc->p_ucred)))
return (error);
/*
@@ -1653,10 +1647,9 @@
if ((error = mac_proc_check_sched(td->td_ucred, p)))
return (error);
#endif
- if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred)))
- return (error);
- if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred)))
+ if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred)))
return (error);
+
if (td->td_ucred->cr_ruid != p->p_ucred->cr_ruid &&
td->td_ucred->cr_uid != p->p_ucred->cr_ruid) {
error = priv_check(td, PRIV_SCHED_DIFFCRED);
@@ -1723,9 +1716,7 @@
if ((error = mac_proc_check_debug(td->td_ucred, p)))
return (error);
#endif
- if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred)))
- return (error);
- if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred)))
+ if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred)))
return (error);
/*
@@ -1815,9 +1806,7 @@
if (error)
return (error);
#endif
- if (cr_canseeotheruids(cred, so->so_cred))
- return (ENOENT);
- if (cr_canseeothergids(cred, so->so_cred))
+ if (cr_bsd_visible(cred, so->so_cred))
return (ENOENT);
return (0);
@@ -1847,7 +1836,7 @@
#endif
#if 0
/* XXXMAC: This could have odd effects on some shells. */
- if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred)))
+ if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred)))
return (error);
#endif
diff --git a/sys/netinet/in_prot.c b/sys/netinet/in_prot.c
--- a/sys/netinet/in_prot.c
+++ b/sys/netinet/in_prot.c
@@ -67,9 +67,7 @@
if (error)
return (error);
#endif
- if (cr_canseeotheruids(cred, inp->inp_cred))
- return (ENOENT);
- if (cr_canseeothergids(cred, inp->inp_cred))
+ if (cr_bsd_visible(cred, inp->inp_cred))
return (ENOENT);
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 5, 4:12 PM (10 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42234750
Default Alt Text
D40628.1796487133.diff (2 KB)
Attached To
Mode
D40628: Fix 'security.bsd.see_jail_proc' by using cr_bsd_visible()
Attached
Detach File
Event Timeline