|
|
|
|
|
by enricozb
2024 days ago
|
|
I personally don't like `curl | bash` because I don't know _how_ something will install:
1) What are all of the directories that something will insert itself into?
2) What of my files (.bashrc, etc.) will it modify?
3) If it modifies those things, will it tell me? The `curl | bash` install pattern means that it can do _anything_. Using a package manager I know that the install will be "typical", and easy to uninstall (that's the case with most of the package managers that I use anyways). Each package manager has a different pattern, sure, but at least it will be predictable. |
|
And if you stray outside the official channels, as most users must at least some of the time, then you're back to all-bets-are-off. Fetching and installing packages from a channel hosted by some third party really is no better from a security standpoint than running a (signed) shell script from that same party.
EDIT: I should add that there may be some new, advanced package management systems that do actually provide strong guarantees, like only putting files in certain directories, never setting the setuid/setgid bits on executable files, or perhaps ensuring that all files from a package are owned by a user:group associated with that package (the Linux From Scratch docs describe a package management scheme like that, it's worth checking out). I'm referring here to the majority of popular package managers, e.g. dpkg, which will run arbitrary code during installation.