Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146608119
D40642.id124437.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
756 B
Referenced Files
None
Subscribers
None
D40642.id124437.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
@@ -1412,21 +1412,18 @@
static int
cr_seeothergids(struct ucred *u1, struct ucred *u2)
{
- int i, match;
-
if (!see_other_gids) {
- match = 0;
- for (i = 0; i < u1->cr_ngroups; i++) {
- if (groupmember(u1->cr_groups[i], u2))
- match = 1;
- if (match)
- break;
- }
- if (!match) {
- if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0)
- return (ESRCH);
- }
+ if (realgroupmember(u1->cr_rgid, u2))
+ return (0);
+
+ for (int i = 1; i < u1->cr_ngroups; i++)
+ if (realgroupmember(u1->cr_groups[i], u2))
+ return (0);
+
+ if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0)
+ return (ESRCH);
}
+
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 5, 1:44 AM (16 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29265565
Default Alt Text
D40642.id124437.diff (756 B)
Attached To
Mode
D40642: cr_canseeothergids(): Use real instead of effective group membership
Attached
Detach File
Event Timeline
Log In to Comment