-
Notifications
You must be signed in to change notification settings - Fork 16
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
Remove redundant command from README.md #38
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Jakub Warczarek <[email protected]>
b2dbc8f
to
2509159
Compare
I think it didn't work without |
@@ -72,7 +72,6 @@ sudo ${HOMEBREW_PREFIX}/opt/socket_vmnet/bin/socket_vmnet --vmnet-gateway=192.16 | |||
|
|||
To install the launchd service: | |||
```bash | |||
brew tap homebrew/services | |||
# sudo is necessary for the next line | |||
sudo ${HOMEBREW_PREFIX}/bin/brew services start socket_vmnet |
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.
We have this warning:
Warning
Typically, thesocket_vmnet
binary in the${HOMEBREW_PREFIX}
can be replaced by any user in theadmin
group.
I think the issue is worse. The socket_vmnet executable can be replaced by a program you run. Some program or script that you run as your user (without sudo) can replace socket_vmnet executable. Then when it is run by lima, the replaced executable run as root.
So the real fix is to remove the brew service instructions, they are unsafe.
If we want to give instructions, they must include all the commands to make running the brew version safe:
- Change ownership (recursively) of the directory where socket_vmnet is installed
- Create safe directory for the socket and logs
- Fixing ownership to make brew upgrade work
With these changes the brew "easy" solution is not so attractive.
I don't think this can be fixed without installing the files as root, like other package managers.
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.
I don't think this can be fixed without installing the files as root, like other package managers.
I think this is correct. For that reason we used to require that the daemon files are owned by root
. But that requirement has been softened in #1220 for the benefit of Homebrew users.
It creates a vulnerability that allows programs run by the admin user to escalate to root privileges without getting a sudo prompt.
So installing socket_vmnet
with brew is not a good idea if you would have qualms about enabling password-less sudo
.
Removing redundant
brew tap homebrew/services
.According to the docs and my own experience, it works automatically without this command.