Hacker News new | ask | show | jobs
by optimuspaul 1957 days ago
I am confused by this. sudo seems like a far larger surface area than running as me. If it's just me then it's just me, but if it's sudo, then it's the entire box.
1 comments

It depends whether you trust the tool maintainers more than the package definition maintainers. I certainly would. But don't take my word for it— here's a MacPorts developer explaining the sandboxing of builds:

https://apple.stackexchange.com/a/106942

> Directories listed in multiple users' $PATH that are writable without superuser privileges can be used for attacks (e.g., by placing a sudo binary that will log the password there). The same can be done by malicious software running as your user in order to get your password

Yikes. That particular attack did not occur to me.

Thank you for this link. This is the first robust argument for running as root that I've seen, and completely upends my assumptions.

I'd been considering trying macports but this has convinced me.