Live data from Hacker News

Run0, a systemd based alternative to sudo, announced

mastodon.social

611–620 of 902 posts

Re: Run0, a systemd based alternative to sudo, announced

#611
post #75

Earlier quoted context omitted.

I'd agree with your message if systemd was just an init system.

It's not difficult to use some parts of systemd without using others. Is it any different than something like coreutils, another package of linux utilities that are synergistic but usable seperately? Nobody complains about coreutils being bundled. Even the rewrite in rust crowd bundle them.

No. The real nightmare is systemd integration with dbus.

Re: Run0, a systemd based alternative to sudo, announced

#612
post #590

Just a side note: sudo is largely maintained by just one dude https://github.com/sudo-project/sudo/graphs/contributors

also worth mentioning: Lennart Poettering "Poettering is known for having controversial technical and architectural positions regarding the Linux ecosystem" https://en.wikipedia.org/wiki/Lennart_Poettering

His positions are mostly controversial because he challenges the way things have been done for a long time. Whenever he presents some new idea/architecture my first reaction is often confusion. Why would he change something that has worked so well for such a long time? But then I take the time to read up on the reasoning behind his ideas and then things start to make sense. Even when something isn't exactly broken, there is still room for better solutions.

Re: Run0, a systemd based alternative to sudo, announced

#613
post #541

Just a side note: sudo is largely maintained by just one dude https://github.com/sudo-project/sudo/graphs/contributors

So many critical components in our system are maintained by just a random good guy on the internet. I can't help but think of another XZ crisis that is yet to come. https://xkcd.com/2347/

I think this may be the more accurate sentiment:

I can't help but think of all the other xz crises yet to be discovered

Re: Run0, a systemd based alternative to sudo, announced

#614

Earlier quoted context omitted.

Same thing is happening with Wayland. It reduces features adds complexity and solves no new problems but here it comes.

How is Wayland more complex than X?

Wayland by itself is simplier -- it is done by "outsourcing" everything a window system should do to the window manager. There is where the complexity kicks in.

Re: Run0, a systemd based alternative to sudo, announced

#615

Can someone explain what this is / how it works to someone who has done a considerable amount of programming but lacks this kind of operating system level knowledge? I was under the impression that ‘sudo’ was baked into the entire system. Like ‘cd’ or ‘ps’. How exactly can you just swap out sudo? Does that involve swapping out chmod as well?

Any linux process can run with elevated privileges (ie: as root) by setting a specific permission bit - https://en.wikipedia.org/wiki/Setuid. This is used for many things like ping and sudo.

Instead Run0 is using systemd to elevate privileges.

There is a lot that could be said, but suffice to say you can have both sudo and Run0 installed. So even if a Distro ships Run0 by default, you can always manually install sudo.

Re: Run0, a systemd based alternative to sudo, announced

#617
post #590

Earlier quoted context omitted.

also worth mentioning: Lennart Poettering "Poettering is known for having controversial technical and architectural positions regarding the Linux ecosystem" https://en.wikipedia.org/wiki/Lennart_Poettering

His positions are mostly controversial because he challenges the way things have been done for a long time. Whenever he presents some new idea/architecture my first reaction is often confusion. Why would he change something that has worked so well for such a long time? But then I take the time to read up on the reasoning behind his ideas and then things start to make sense. Even when something isn't exactly broken, t…

There have been lots of suggestions for how to improve linux / unix for a very long time.

The first great war I remember, and I'm sure there were more before I was around, was DJB vs everyone. For the most part, I think his designs, "weird" as they were / are, are still better than almost every crackpot variation of them that's come since.

Re: Run0, a systemd based alternative to sudo, announced

#619

Can someone explain what this is / how it works to someone who has done a considerable amount of programming but lacks this kind of operating system level knowledge? I was under the impression that ‘sudo’ was baked into the entire system. Like ‘cd’ or ‘ps’. How exactly can you just swap out sudo? Does that involve swapping out chmod as well?

Sudo is a program that: 1. Parses the sudoers file to check if the current user can run the command provided. 2. If so, authenticates the user using PAM. 3. If both those pass, sets the user id to root and runs the program. There is nothing special about it. All steps can be done by any program. In fact sudo is usually not even an installed by default package in many systems. The only seeming magic bit is part 3, whe…

Just to highlight some of the complexities of `sudo` to complement your helicopter view:

- Sudo can use PAM, or any other means, depending on NSS (local, ldap, through PAM, etc)

- Sudo can use a sudoers file, directory, or even LDAP fields to resolve accesses.

- Sudo can temporarily cache and forward authentication to avoid constantly retyping passwords

- Sudo can elevate you depending on your group, user, or even a glob of the command you want to type

- Sudo can log and report the executed commands

- Sudo can import none, part or all of your environment to run its command

- Etc

Sudo is very complex

Re: Run0, a systemd based alternative to sudo, announced

#620
> Or in other words: the target command is invoked in an isolated exec context, freshly forked off PID 1, without inheriting any context from the client (well, admittedly, we do propagate $TERM, but that's an explicit exception, i.e. allowlist rather than denylist).

I think in practice, this is going to be an endless source of problems, so much so that it won't be adopted. The usual use case of sudo is that you have a normal shell command, making use of the environment for context in all the ways that shell commands do, but it doesn't have all the permissions it needs, so you add "sudo" as an adverb.

Sometimes it makes use of environment variables. Sometimes stdin or stdout is redirected to a file, or to something more exotic than a file. Sometimes that means it runs inside of a chroot, or a Docker container. Sometimes you care about which process group it runs in.

And sometimes the thing you're running is a complicated shell script or shell-script-like object, eg "sudo make install". In this case, you don't really know what its dependencies are. In fact this is a common enough case that, if run0 becomes widespread, I expect it'll have a flag or a set of flags that make it act exactly like sudo, and I expect people to wind up learning that they should always give run0 those flags.

And I'm kind of worried that when this breaks stuff, the systemd project is going to push forward with some plan to get rid of sudo, and not gracefully accept the feedback that this is breaking things. I'm particularly worried about this because of the whole saga of KillUsersProcesses breaking nohup and screen, which to my knowledge is still broken many years later.

Post reply on HN