65 points

But with one key difference: it’s *not* in fact SUID. Instead it just asks the service manager to invoke a command or shell under the target user’s UID. It allocates a new PTY for that, and then shovels data back and forth from the originating TTY and this PTY. 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).

permalink
report
reply
38 points

I understood some of those words…

permalink
report
parent
reply
17 points

Unfortunately, this is about as easy as it gets. Practically though, it isn’t going to matter. It sounds like run0 will be a drop-in replacement for sudo. We will know for sure in about 3 days (at the rate at which they assimilate features).

permalink
report
parent
reply
1 point
*

So there would be no practical benefits of switching?

permalink
report
parent
reply

So none of my environment variables come with? 😐

permalink
report
parent
reply
15 points

I would fucking hope not. TERM is explicitly passed along as the only exception, which is the only sensible default for temporary privilege elevation in a shell.

permalink
report
parent
reply
6 points

Sudo also blocks almost all environment variables, with the option to set or copy them on demand. I assume that run0 will have similar facilities to propagate variables on demand.

PS: This is my technical understanding. Personally, I don’t like systemd eating up all the other utilities.

permalink
report
parent
reply
26 points

I can’t wait for systemd to ship its own kernel next year.

permalink
report
reply
22 points

Dude, just write down a couple of lines in your posts so that people can know what they’re about.

permalink
report
reply
6 points

It’s a phoronix article, there’s never more than two paragraphs and a quote in there anyway.

permalink
report
parent
reply
4 points

But why should I visit the website (that by the way now returns 500) to know if I’m interested in the article?

permalink
report
parent
reply
1 point

You can read this blog post, authored as a series of tweets instead https://mastodon.social/@pid_eins/112353324518585654

permalink
report
parent
reply
16 points

I’m sticking with doas, thanks.

permalink
report
reply
17 points

OpenBSD’s sudo replacement called “doas”. While it greatly simplifies the tool and removes much of the attack surface, it doesn’t change one key thing: it’s still a SUID binary.

permalink
report
parent
reply
15 points

Yall understand that what actually changed is a symlink? That systemd-run is now linked from run0, and that’s enough to make a SUID-less sudo?

permalink
report
reply
7 points

Basically. systemd-run was already able to do it, all that really changed is the interface for it. The change to run.c in the patch itself was <400LOC, and the entire patch was <1.4k lines with most being docs, tests and utils for coloring the terminal.

permalink
report
parent
reply
1 point

Didn’t know this, thanks for sharing!

permalink
report
parent
reply

Open Source

!opensource@lemmy.ml

Create post

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

  • Posts must be relevant to the open source ideology
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

Community stats

  • 3.3K

    Monthly active users

  • 1.9K

    Posts

  • 31K

    Comments