3 ms·
I 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 yo
by soneil 9y ago
I 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.