3 ms·
Systemd compat for doas
- mrweasel 9y agoA little more explanation is available here: https://github.com/systemd/systemd/issues/6237#issue-239378060 https://github.com/systemd/systemd/issues/6237#issue-2393780... I don't know what the POSIX standard says about having a number as the first digit of your username. If it's not allowed, systemd is doing the right thing by rejecting the username, while doing the wrong thing by defaulting to root and starting the service. If a username is invalid, whatever the reason, that service simply shouldn't be started.
- nieve 9y agoAs previously discussed it's allowed by POSIX and supported by major distributions and Unixen. The systemd team's assertion that it's not is based on a couple of programs, mainly one Debian utility. Basically they don't believe that it should be allowed and they don't want to put in even the tiniest fix, so they're asserting that it's invalid based on prejudice.
- JdeBP 9y agoZbigniew Jędrzejewski-Szmek is a systemd developer and clearly wants to put in this tiny fix: * https://github.com/systemd/systemd/pull/6300 https://github.com/systemd/systemd/pull/6300
- soneil 9y agoI realise we're beating a dead horse at this point, but to my mind, "what POSIX says" is a red herring. It's the unexpected behaviour that's the problem (as you point out). Say I have two users, "nodigit" and "1digit". Given "User=nodigit", Exec is run as user 'nodigit'. This is expected behaviour. Given "User=noexist", the unit file is rejected as invalid because 'noexist' does not exist, creating a syntactically invalid unit. This is also expected behaviour. But given "User=1digit" the unit is accepted as valid, and runs, but the User stanza is ignored as the user is invalid. So the unit is run as if the User line didn't exist, and we get root. I don't care what posix says. I don't care if these usernames are valid. All I want is one defined behaviour. If a non-existant username rejects the unit, then an invalid username should also reject the unit.
- JdeBP 9y ago> I don't know what the POSIX standard says You will if you read the very thing that you yourself pointed to. (-: Or indeed the prior discussion of this on Hacker News. * https://news.ycombinator.com/item?id=14682210 https://news.ycombinator.com/item?id=14682210