Page MenuHomeFreeBSD

D40628.id123494.diff
No OneTemporary

D40628.id123494.diff

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
@@ -1463,11 +1463,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_visibility(u1, u2)))
return (error);
return (0);
}
@@ -1528,9 +1524,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_visibility(cred, proc->p_ucred)))
return (error);
/*
@@ -1645,10 +1639,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_visibility(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);
@@ -1715,9 +1708,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_visibility(td->td_ucred, p->p_ucred)))
return (error);
/*
@@ -1807,9 +1798,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_visibility(cred, so->so_cred))
return (ENOENT);
return (0);
@@ -1839,7 +1828,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_visibility(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
@@ -69,9 +69,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_visibility(cred, inp->inp_cred))
return (ENOENT);
return (0);

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 20, 5:21 AM (7 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25709495
Default Alt Text
D40628.id123494.diff (2 KB)

Event Timeline