3 ms·
As the sibling mentioned, using sudo gives the process root, with the implication being it has full access to your system and can potentially do a lot more dama
by lucideer 6y ago
As the sibling mentioned, using sudo gives the process root, with the implication being it has full access to your system and can potentially do a lot more damage. Extend this to any arbitrary installer you're running and it becomes scary. So brew's sudo-less model seems more secure in this context.
In reality however, macports uses "privilege separation" which drops privileges for each individual install to a separate "macports" user. This is more secure than brews sudoless approach because not only does the installer not have root access, it doesn't have full access to your own user either (e.g. your HOME). Privilege separation isn't possible without initially having root privileges.