I see people talking about doas saying it’s just like sudo but with less features. I’m just wondering if there is any situation where you should use doas or if it’s just personal preference.

You are viewing a single thread.
View all comments View context
1 point

Why would a system update need privileges? What is the privileged action in pulling and applying updates your distro ships?

permalink
report
parent
reply
4 points

I mean, that’s one of the things that definitely needs permissions, right? You’re overwriting system config and executables for all users on your system. Otherwise a malicious actor could just replace firewall configs, or embed malicious code into your executables. If not /bin and /etc what else should need privileges?

permalink
report
parent
reply
4 points

On a mutable distro maybe but also no. You need to update your system, always. The updates come from the distro, and you only invoke your privileged package manager to do these changes for you. Its not privileged.

If a malicious actor is able to replace package repos that your package manager uses, for example an infected server in the same network, this would be the only way to inject arbitrary stuff by using dnf update or rpm-ostree update.

Installing software and updating the already existing is very different.

permalink
report
parent
reply
-1 points

What is the privileged action in pulling and applying updates your distro ships

Tell me again how you want to write system files with a non-admin account, and I’m going to show you my friend Lumpy, who will walk all over your machine so fucking fast. Fuck that, Lumpy’s a genius. One of his underlings (he manages now) will do it on a lunch break.

permalink
report
parent
reply
2 points

Uhm what?

permalink
report
parent
reply
2 points

The short answer is that my distro did not let me do this easily. But that was for good reason.

A system update would require too many privileges that it would be almost indistinguishable from root.

Currently, every user I have is restricted in what files it has access to. A system update user would need access to so many files, including install locations of all binaries, and non-binary installation paths of all current and future programs I install (some package installs modify /var, many modify /etc, and so on).

This user will also have access to all these programs, down to system applications. It can trivially break a permission system I come up with.

It may be possible to restrict system updates to a user, but it would be such a powerful user that its not really worth it.

permalink
report
parent
reply
1 point

Does the user have that access? In my case with rpm-ostree they can just execute 2 commands rpm-ostree refresh-md (get updates) and rpm-ostree update. rpm-ostree rebase is used for system upgrades afaik, that one needs a password.

permalink
report
parent
reply
1 point

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?

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

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.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 9.6K

    Monthly active users

  • 5.8K

    Posts

  • 162K

    Comments