Live data from Hacker News

Run0, a systemd based alternative to sudo, announced

mastodon.social

841–850 of 902 posts

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

#841
post #2

Uses polkit. run0, which behaves like sudo, but works entirely differently and is not SUID. Run0 asks the services manager to create a shell or command under the target user’s ID, creating a new PTY, sending data back and forth from the originating TTY and the new PTY.

How hard would it be to create a program to send a signal to polkit "impersonating" run0 and obtains a root shell? :)

run0 does not send any signal to polkit, systemd does.

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

#842

Earlier quoted context omitted.

This and many other discussions misses the point that most people that don't like systemd have with it. It can largely do everything it replaces, but differently, in some cases with improvements. Every year it increases its scope of 'problems' its solved. But the issue is it hasn't _ACTUALLY_ solved a problem for me in about a decade, its only introduced problems. Its replaced things that worked perfectly for me and…

> If it actively solved problems for the majority of users we wouldn't hate it so much It does and we don't. The only "we" who are "hating it so much" is a tiny vocal minority.

Ahh the vocal minority in support makes its appearance!

I wouldn't call the opposition tiny, although the vocal portion of any group tends to be the smallest. This would be my first online comment on it so I'm certainly part of the non-vocal group you ignore, that in my experience is significantly larger than the vocal side of group you dismiss.

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

#843

Earlier quoted context omitted.

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 g…

> 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 Incorrect, because nowhere in the IPC dance are these components exposed to the same untrusted environment as they are with sudo.

Yes, they are. The kernel for obvious reasons. Second, the IPC server now has to handle (and possibly pass through data) from the untrusted environment, unless you are happy with a sudo that does not even ferry stdio. Frankly, having properly working suid (the kernel does most of the job) sounds MUCH easier than having this type of APIs exposed to arbitrary users from pid1. In fact, as per Lennart's last sudo tty bug, the issue was with how sudo was exec()ing the target binary in the _target_ context (not the original context). Having sudo as a global daemon instead of a suid exec is not going to protect you against those; actually may make them worse for all I know.

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

#844

Earlier quoted context omitted.

you have the wrong view point. he just have a different opinion than you. he single handled managed to fool RH and all distros into turning Linux administration just like windows. systemctl list of services is so inspired by the atrocious windows' admin list of services (which have 3 fields supposed to describe the service, but they all just tell you the name again). it's no wonder his reward was a job at Microsoft.…

I continue to be baffled at this widespread belief that Poettering somehow hoodwinked every single major Linux distro into accepting a shit product with, idk, hypnosis or something. Is it not possible that systemd is simply better than the alternatives, and the distro owners are smart enough to notice that, instead of just wrapping themselves cultish mantras about The Unix Way and how anything which resembles a desig…

Yes, it has always reminded me of the old "Apple just sells all those shiny devices because they're good at marketing" trope.

As if marketing alone could do that. Poettering does seem to be, to a casual observer, kind of a dick. Arrogant, dismissive of competing products... kind of like that other guy — also kind of a dick — who supposedly had that "reality distortion field" that hoodwinked all those poor saps into buying his phones.

There's no fucking way in hell you are able do that if the user base doesn't think the product is good. To those saying it, I always reply, "It may not be the product you want, but a shitload of people disagree with you, quite obviously."

I'm not personally a huge fan of the iPhone or systemd. But they are both clearly "the best" for the largest number of people. (And that is even clearer for systemd, as it doesn't cost hundreds or thousands of dollars more then the competing products.)

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

#845
post #741

> 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…

run0 has already been exploited: https://twitter.com/hackerfantastic/status/17854955875146385... There will be plenty more where that came from. Yet another terrible idea and terrible implementation from Poettering.

That's not an exploit, that's just a sequence of basic misunderstandings about how things work on Linux. Which would be fine, nobody knows everything, if they weren't coated with grand claims and not-so-veiled personal abuse.

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

#846
post #781

I am really not looking forward to systemd taking over another part of the system with how unpolished and flaky their replacements usually are. Anyway, I have been using doas instead of sudo for a while on servers, it’s rock solid if you don’t need some of the more advanced features of sudo.

I honestly have no clue what you mean. You can take unit files, journald, timers, and all the other neat features from my cold, dead hands. I’m not going back to writing brittle shell scripts; systemd has made my life SO much easier.

> I’m not going back to writing brittle shell scripts

Then stop doing that.

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

#847
post #757
post #741

Earlier quoted context omitted.

run0 has already been exploited: https://twitter.com/hackerfantastic/status/17854955875146385... There will be plenty more where that came from. Yet another terrible idea and terrible implementation from Poettering.

The linked PoC requires that the attacker already has root so that it can disable the default ptrace protection.

Requires root not just for the ptrace protection, but also to gain membership of the 'tty' group which gives control over all ttys. And then goes all surprised pikachu when it turns out that allows taking over ttys. Duh?

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

#848

Earlier quoted context omitted.

If you don't like Unix maybe don't write software for a Unix clone.

It's the best (or, least worst) OS we have right now, though, I just want it to evolve on those Unix ideas.

That's called plan9.

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

#849
So by design run0 does not do what sudo does. If I understand it correctly it has to stay a child of the daemon it's forked or does Linux provide an API to mangle the poor process table to change that since because according to POSIX the process would not part of the current session, or process group? How does this interact with (or break) shell job control since you can't forward SIGKILL. Does anything prevent the invoked process (which could also have less privileges) from holding on to the passed file descriptors e.g. the one to the callers controlling tty or is it restricted to always go through pipes/sockets/a fresh pseudo-tty?

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

#850
post #849

So by design run0 does not do what sudo does. If I understand it correctly it has to stay a child of the daemon it's forked or does Linux provide an API to mangle the poor process table to change that since because according to POSIX the process would not part of the current session, or process group? How does this interact with (or break) shell job control since you can't forward SIGKILL. Does anything prevent the i…

Okay further down it explains that it always goes through a fresh pseudo-tty (at least for interactive commands?). That solves the file descriptor passing problem but not the reliable signal handling for job control since there're signals you can't catch and forward.
Post reply on HN