Live data from Hacker News

Run0, a systemd based alternative to sudo, announced

mastodon.social

691–700 of 902 posts

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

#691

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?

> I was under the impression that ‘sudo’ was baked into the entire system.

There's a capability baked into the entire system named 'setuid' which allows certain binaries run by a user to access things as if they were root.

For example, when a user changes their password using 'passwd' that executable gets special write access to the file containing hashes of all users' passwords. The system's security relies on passwd being coded carefully enough that it won't let one user change another user's password, no matter what input they give it.

sudo is "just" a setuid binary, which checks if the user is allowed to run things as root and if so uses its power to run them. It can be replaced.

There are a bunch of design implications resulting from the way setuid works - for example, the operating system has a special setting so if you plug in a USB drive containing a setuid binary, the setuid bit on it gets ignored. So you can't make a special version of sudo at home which doesn't check permissions, then take it to the school computer lab and have it work there.

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

#692

This is playing on the difference between hoping that sudo does the right thing juggling setuid and capabilities, and having a strict IPC boundary between privilege levels. It sounds like a great use of systemd, for those who want to use it.

There's like 3 components involved in making setuid safe (the kernel, the dynamic loader, and your exec), and at least one of them wasn't doing its job correctly (the dynamic loader). IPC by definition involves a superset of these components.

There's no reason to think that if you can't make a simple setuid binary safe, you can make IPC safe. IPC is an order of magnitude more involved. Specially because in order to gain any effective security you need a 3 way IPC (1st level = the client, which is completely untrusted; 2nd level = the request parser, which is trusted but runs without elevated permissions; 3rd level = the actual elevator process, which must run with elevated permissions).

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

#694

Earlier quoted context omitted.

I for one love to type out 13 extra characters to a 4 character command to disable dumb choices by the developer. On a more serious note, I wonder what random ASCII escape sequences we can send.

'alias' is your friend.

I shouldn't need to alias behaviour that violates the principle of least surprise on every single machine I need to run elevated commands on.

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

#695
post #425

> One could say, "run0" is closer to behaviour of "ssh" than to "sudo", in many ways. This is an interesting offhand comment. You could implement a very similar tool by SSHing to localhost.

I had to write an ssh client for an embedded system long ago. Looking at the design, I found it to be sort of messy. You could restrict commands ssh could invoke, but it didn't seem super secure. Also scp/sftp was not well designed. You basically had to give ssh access to your system to allow a file to be copied, and there were no real path restrictions. I personally thought ssh could be much more robust in what you…

You can restrict SSH commands by having it serve a restricted shell instead of arbitrary shell. Like how there's games where you can SSH into server to play

https://crawl.develz.org/wordpress/howto#connecting

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

#696

Earlier quoted context omitted.

It's fine. Not every software needs to be infinitely configurable and open source just in case the configurations don't cover the needs of all. We need opinionated software, if you don't want to make any choice for me, you can't even give me an assembly editor for fear of forcing your CPU arch of choice.

You can't think of ways this could break things? I would find this a useful feature, but I'm also aware of how this works, and the issues it could cause.

No? Of all the esoteric escape sequences that terminals handle the ones that change colors are well trodden.

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

#698

Earlier quoted context omitted.

He's controversial because numerous times his ego has so severely clouded his judgemental that he refuses to see egregious bugs in his programs for what they are. Just one example: https://github.com/systemd/systemd/issues/6237#issuecomment-... The "people hate him because he makes new stuff" narrative is just more ego-protecting cope. Many developers of other new systems are widely respected and appreciated because…

Or in Linus Torvalds' words[1]: It does become a problem when you have a system service developer who thinks the universe revolves around him, and nobody else matters, and people sending him bug-reports are annoyances that should be ignored rather than acknowledged and fixed. At that point, it's a problem. [1]: https://lkml.org/lkml/2014/4/2/580

But even then, system service developers don't try to 'own the whole world' so to speak and so they do need to play nicely with others. Mr. Poopering philosophy is the minute a dependencies maintainer becomes a thorn in his side - he absorbs that project into systemd. The distribution packagers follow like starving dogs on a hunt

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

#699

I think we're entering a point where GNU/Linux should be called Systemd/Linux

That was the plan (by Redhat) all along, to have better control of the platform.

To what end? It seems Redhat made a thing that solved a lot of their problems as distro maintainers and then made it OSS. This "control" doesn't really buy them anything.

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

#700

Earlier quoted context omitted.

He's controversial because numerous times his ego has so severely clouded his judgemental that he refuses to see egregious bugs in his programs for what they are. Just one example: https://github.com/systemd/systemd/issues/6237#issuecomment-... The "people hate him because he makes new stuff" narrative is just more ego-protecting cope. Many developers of other new systems are widely respected and appreciated because…

> Just one example: https://github.com/systemd/systemd/issues/6237#issuecomment- ... 1. He gave a clear reason why it is how it is 2. He realizes it is/might be frustrating 3. even `adduser` will not allow it by default 4. The issue that it still runs the unit even with config errors has been addressed: https://github.com/systemd/systemd/commit/bb28e68477a3a39796... (~2 weeks after the issue was opened)

> 3. even `adduser` will not allow it by default

5. useradd does allow it (as noted in a comment). 6. Local users, and the utilities that create them, are not the only source, there things like LDAP and AD.

7. POSIX allows it:

* https://github.com/systemd/systemd/issues/6237#issuecomment-...

Post reply on HN