101
Is there an advantage of using doas over sudo
(thelemmy.club)
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Only the root user has access to system updates on my system currently.
What does
rpm-ostree update
do exactly? Does it execute the update? Or is that the rebase command only?No
rpm-ostree
downloads the diffs, applies existing changes (added or removed packages) and builds a new image that gets staged as first boot target. After reboot you are on an updated system.If it builds a new image that replaces the entire system it could be compromised to give full access to the entire system just as easily as sudo, possibly more easily.
No it just pulls the ostree / OCI image from the fedora image registry and applies changes that need sudo privileges to change, remove etc.
Deploying a different image is not allowed.
See this issue for details
The component that is like sudo in this case is polkit. Of course an unprivileged user can be used to run sudo commands as well, limited by the rules in the sudo config file, just as these polkit rules limit what the user can do...as long as there is no security issue in sudo and polkit respectively but the actual work is done by a privileged process that is merely controlled by the commands given by the unprivileged user.
Yes thats the point, the specific actions are a good way to act like a firewall for the access to the privileged process, invoked by anyone.
This is brilliant, as unprivileged users over ssh, or not even logged in, can invoke the updates in that case, making a "grandma pc" that is immutable and autoupdating possible.
See this discussion on how it would eventually be implemented
I see. I have little knowledge, but I bet that the "root privileges" part of this process is the reboot. Upon rebooting, system updates are applied from the new image via some privileged process.
That's pretty neat. Unfortunately I haven't ventured deeply enough into that type of system yet (was it called immutable distro or something?). I use gentoo, which doesn't support this out of the box.
Thanks for showing me something new!
Rebooting does not need root privileges either, on no system. There really is nothing privileged about updating already existing software. Android is completely rootless and updates are automatic, but can be done manually too.
You can read a bit into OSTree, its very cool. But seems to be very complex and somehow they want to switch to OCI images now, idk.
But the way ublue builds their systems is astonishing, elegant, simple, structured and fully automated.