-
Notifications
You must be signed in to change notification settings - Fork 0
Linux IPC hardening: lantern-group authorization #338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
eb37895
26a30d3
39fab57
9e8541c
777aa45
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -61,5 +61,5 @@ func authPeer(next http.Handler) http.Handler { | |||||
| } | ||||||
|
|
||||||
| func peerCanAccess(peer usr) bool { | ||||||
| return peer.isAdmin | ||||||
| return peer.isAdmin || peer.inControlGroup | ||||||
|
||||||
| return peer.isAdmin || peer.inControlGroup | |
| return peer.isAdmin || peer.inControlGroup || peer.uid == "0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds right!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conn_nonwindows.gois built on Android/iOS (//go:build !windows), but the newly added Linux group-check code depends oncontrolGroupGID()/controlGroupGIDInt()which are only defined incontrol_group_nonwindows.go(!android && !ios && !windows). This will cause Android/iOS builds of packageipcto fail with an undefined symbol error. Consider moving the Linux-specific helpers (linuxUserInControlGroupand theruntime.GOOS == "linux"branch) into a//go:build linuxfile, or widening/providing stub implementations forcontrolGroupGID*on mobile builds.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above sounds right to me!