5 ms·
I don't understand how this could be considered not a bug. Clearly, the unit was intended to run as 0day, not root. I must be missing something.
by lysium 9y ago
I don't understand how this could be considered not a bug. Clearly, the unit was intended to run as 0day, not root. I must be missing something.
- kosinus 9y agoThe rationale seems to be: "you're going to run into a lot of other software that'll also fail". He mentions xinetd as an example.
- imron 9y ago> I must be missing something. A 0day is supposed to get you root access, so behaviour is working as expected.
- hug 9y agoBugs are when software runs in a way other than the way the software is intended to run by the developer. If you define "usernames starting with numbers" as invalid, and then define the behaviour of unit files with a user directive containing an invalid user to run as root, then the behaviour is as expected, and is not a bug. The fact the software doesn't do what any sensible user would expect is completely irrelevant to it being a "bug" or not. [edit: removed dig at poettering]
- hahainternet 9y ago> The fact the software doesn't do what any sensible user would expect is completely irrelevant to Poettering. Logs and error and continues? I think you're confused by Systemd exposing all sorts of frailties of traditional software. How do you propose that it differentiate between UIDs and user names?
- Thetawaves 9y agoWhile I am largely on the systemd side - that one is easy. Make User= only accept input that starts with a character. Add another option for Uid= that would only accept numeric digits.
- garaetjjte 9y ago>How do you propose that it differentiate between UIDs and user names? Maybe follow GNU coreutils, prefix ids with + https://www.gnu.org/software/coreutils/manual/html_node/Disambiguating-names-and-IDs.html https://www.gnu.org/software/coreutils/manual/html_node/Disa...
- hahainternet 9y agoI wasn't really asking for a suggestion, more pointing out that it isn't some previously solved and agreed upon issue. It's something that has to be picked, and the parent poster will undoubtedly count as 'arrogance' for choosing a workaround.
- okasaki 9y agoUse UserName and UserID instead of User?
- hug 9y agoBy using a different setting name for UIDs and usernames, or by prepending UIDs with a +, or... That's not the problem, though. The problem is that systemd encounters a username setting, and the workaround decided upon was that if you find an explicitly stated username setting, that the best thing to do in the case of that explicity stated username being something you consider invalid (despite it being completely valid on the largest platform you target) is to throw that statement away and proceed as the highest privileged user on the system, even though the very intent of the username setting is often to restrict privileges. It tells you about it in a log file, though, that you'll definitely see before it's too late! Even that poorly thought out situation being the status quo isn't the problem. The problem is refusing to consider that this is perhaps not the best workaround, prior to this workaround becoming a de facto standard embedded by practice. This isn't an us-versus-them thing. It's not about being combative or saying that anyone is wrong or bad. It's about looking for continual improvement.
- lysium 9y agoHm, seems as if this is what I was missing. I was on the sensible side.