Elektrine
Log in Register
Paige Chat Timeline Gallery Friends Email Drive DNS Private DNS Domains VPN Kairo Nerve
Remote

daandemeyer

@daandemeyer@mastodon.social
mastodon 4.8.0-nightly.2026-10-06
  • Open on mastodon.social
0 Followers
0 Following
16 Posts
Joined January 23, 2024
Open post
daandemeyer @daandemeyer@mastodon.social
· 6mo ago

Finally had a go at solving one of my biggest pet peeves with booting up Linux, having to add console=ttyS0 or console=hvc0 or console= to the kernel command line to get output on the serial console. With https://github.com/systemd/systemd/pull/41387, systemd-stub will now try to auto-detect whether a single virtconsole or serial console is attached without graphics output and append console= to the kernel command line automatically so you get output on the serial console automatically.

github.com
35
12
13
1
Open post
daandemeyer @daandemeyer@mastodon.social
· 10mo ago
Replying to
I got inspired to implement this when I was playing around with bpftrace and systing and got annoyed that the files written by these tools were owned by root instead of my own user. Now I can run "run0 --empower bpftrace" and be sure that any written files are owned by own user instead of root.
21
17
0
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 7mo ago
Replying to
This is hooked up into nspawn via a new --private-users-delegate= switch to delegate N uid ranges into the nspawn container. With this we're very close to making nested nspawn work but this requires a few more changes to nspawn which will come in 261. I'm also hooking this up to mkosi so we can finally boot VMs and containers from directories unprivileged and without /etc/subuid. vmspawn also learned to boot from a directory using nsresourced in v260.
10
3
1
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 10mo ago
Replying to
@funkylab Instead of changing to root, we keep the current uid/gid and instead give it full ambient capabilities (https://man7.org/linux/man-pages/man7/capabilities.7.html) That's sufficient to pass all kernel privilege checks (disregarding LSMs). To pass polkit checks, we run the "run0 --empower" session with the new "empower" group as an auxiliary group and we ship a polkit rule to allow all actions for users in the "empower" group. Note that this won't work if a tool checks for uid 0 instead of capabilities.
man7.org

capabilities(7) - Linux manual page

14
8
2
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 7mo ago
Replying to
@xogium Currently podman / docker don't nest within nspawn for the same reason that nspawn doesn't nest within nspawn (kernel mount shenanigans). Once we fix that you'll be able to run nspawn, docker and podman nested in nspawn (I think, there may be more issues with getting podman/docker running). If you want to run unprivileged podman/docker within nspawn they'll need to integrate with nsresourced and mountfsd (instead of using newuidmap/newgidmap like they do right now).
3
1
0
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 10mo ago
Replying to
@wolf480pl Processes of the same user should be able to send signals to it yes. I actually consider that a feature. Currently, managing a subprocess invoked with run0 or sudo is a pain because you can't stop it except by messing with input pipes or TTYs passed through to the subprocess.
4
3
0
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 5mo ago
Replying to
@swick I just landed a refresh to chaseat() in systemd so it takes separate root and directory file descriptors as part of the InodeRef prep work. The only annoying thing about that is you can't easily check if a directory file descriptor is a child of another directory file descriptor. You have to walk upwards to check which is just horribly slow.
1
1
0
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 10mo ago
Replying to
@felixs @funkylab A debugger will be able to attach just fine. I've opened https://github.com/systemd/systemd/pull/39839 to clarify that other processes of the selected user will be able to mess with the empowered session. So using run0 --empower gives malicious processes a vector to infiltrate the system. But so does sudo -E PATH or using sudo to execute anything in your home directory or using sudo -s, ....
GitHub

run0: Add note about processes having privileges over --empower sessions by daandemeyer · Pull Request #39839 · systemd/systemd

The systemd System and Service Manager . Contribute to systemd/systemd development by creating an account on GitHub.

3
1
0
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 6mo ago
Replying to
@agowa338 I have no clue how I would even test this unfortunately.
1
1
0
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 6mo ago
Replying to
@samueldr So I'm already reworking this to pick the right index on x86 since they're statically allocated there. You're right that on arm we can't really know for sure. I kept it for now to pick ttyAMA0 if we find a single serial console. As for the graphical console, you're of course right that this breaks if the uefi firmware can't detect the graphics output. I guess I could make it opt-in to avoid breaking existing use cases.
1
1
0
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 10mo ago
Replying to
@wolf480pl Effectively it's up to the user to decide if they're OK with their application running under "run0 --empower". If you're in an environment where you don't want the user to be able to mess with the empowered session via signals, then you should not use the --empower switch.
2
1
0
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 10mo ago
Replying to
@funkylab CAP_DAC_READ_SEARCH is sufficient actually
2
1
0
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 10mo ago
Replying to
@juliank @nik @pid_eins This isn't a new privilege escalation mechanism. All this option does is make some already existing features more easily accessible. I encourage you to take a look https://github.com/systemd/systemd/pull/39495 to see how trivial the PR introducing --empower was.
GitHub

run0: Add --empower by daandemeyer · Pull Request #39495 · systemd/systemd

--empower gives full privileges to a non-root user. Currently this includes all capabilities but we leave the option open to add more privileges via this option in the future. Why is this useful? W...

0
2
0
0
Open post
daandemeyer @daandemeyer@mastodon.social
· 10mo ago
Replying to
@nik @juliank @pid_eins We disagree that the option is simple and innocent looking. Users have to go out of their way to type --empower to get this functionality. I doubt anyone will be doing that by accident. We do acknowledge that if you leave one of these sessions open and switch back to it that it can be hard to figure out if you're in a regular run0 session or an empowered one. https://github.com/systemd/systemd/pull/39882 improves on this by adding a custom color, for empowered sessions.
GitHub

run0: Give --empower its own color, title and emoji by daandemeyer · Pull Request #39882 · systemd/systemd

When in --empower mode, all created files will be owned by the current user, which could be problematic when creating files outside of the current user's home directory, as other processes runn...

0
0
0
0
Back
313k7r1n3
Elektrine

Tor hidden service

elekhj7afj4qnrr4yd3bkzslsyo5jgfxw3orgjkhlcxifueodybyiiad.onion

I2P eepsite

j6b6cyk6gjmepjih7jjadxgxvvf3lzzujljuu2v4biemzpg3naya.b32.i2p

Platform

  • Email
  • Chat
  • Timeline
  • VPN
  • DNS

Company

  • About
  • Contact
  • FAQ
  • Lite (no JS)

Legal

  • Terms of Service
  • Privacy Policy
  • Transparency Report
  • Report Abuse
  • Warrant Canary
  • VPN Policy

Support

  • support@elektrine.com
  • Report Security Issue
Mail client setup IMAP mail.elektrine.com:993 POP3 mail.elektrine.com:995 SMTP mail.elektrine.com:465
© 2026 Elektrine. All rights reserved. Server: 21:37:44 UTC