Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150117856
D40642.1791736367.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
783 B
Referenced Files
None
Subscribers
None
D40642.1791736367.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
@@ -1404,21 +1404,18 @@
static int
cr_seeothergids(struct ucred *u1, struct ucred *u2)
{
- int i, match;
+ if (see_other_gids == 0) {
+ if (realgroupmember(u1->cr_rgid, u2))
+ return (0);
- 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);
- }
+ 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
Sun, Oct 11, 4:32 PM (20 m, 26 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30305712
Default Alt Text
D40642.1791736367.diff (783 B)
Attached To
Mode
D40642: cr_canseeothergids(): Use real instead of effective group membership
Attached
Detach File
Event Timeline
Log In to Comment