4 ms·
I'm less and less surprised by the hate poettering gets. It's like he's deliberately trying to be as arrogant and ignorant as possible. POSIX says usernames sta
by srett 9y ago
I'm less and less surprised by the hate poettering gets. It's like he's deliberately trying to be as arrogant and ignorant as possible. POSIX says usernames starting with a digit should be fine. But because very few utils have more restrictive rules, systemd arbitrarily follows them too, but reacts in the most idiotic way possible if it considers a username invalid.
Like last time, when in his opinion, "rm -rf *" should have ascended into ".." and shredded the whole file system, just like some systemd tool does. A bug? Usability issue? No way.
What the fuck is wrong with this guy? Since day one of systemd he rallies the world advocating how all the existing init systems are convoluted, full of hacks, hard to maintain while systemd is clean and elegant, and then he seriously defends these insanely stupid unintuitive behaviors? I just don't get it.
- zokier 9y ago> POSIX says usernames starting with a digit should be fine. I'm not sure if POSIX has any relevance here. Afaik systemd isn't claiming any sort of POSIX compliance, nor is it targeting POSIX systems in general, in fact it is explicitly Linux-only.
- mjw1007 9y agoIn that case the systemd developers ought to have been thinking «usernames beginning with digits do exist in the wild on linux systems, therefore we should support them».
- ArneBab 9y agoThey just would have had to think "let’s do the safe thing — instead of just assuming everything goes well and potentially using the root user as fallback if we’re wrong". It’s a mindset/philosophy problem, and that doesn’t change when bugs get fixed. It would require the devs to change, but that didn’t happen in the past decade, so we cannot just assume that it will happen in the next.
- db48x 9y agoBut you have to be root to install a systemd unit in the first place...
- falcolas 9y agoThere are also user-level unit files; can this bug be triggered by those? EDIT: No; it acts as if the 'User=' directive doesn't exist.
- digi_owl 9y agoAnd? What is going on here is that an admin thinks he has shored up the service defined in the service file, because hey, it runs. Only to later have the server 0wned because apparently it was running as root the whole time...
- CodeWriter23 9y agoDoesn't mean I want systemd silently escalating my process to root when I think I've told it to contain privileges of the process to a specific userid. Clearly the correct behavior for such a program is to throw an error if it is rejecting a username for ANY reason, even when that reason is supported by stilted reasoning.
- chronid 9y agoBreaking expectations is not a reasonable default.
- srett 9y agoYes I tried to do research on this on the past. Linux, as in "just the kernel", doesn't care about user name formats as far as I can tell. However, the Linux philosophy goes "try to adhere to POSIX where it makes sense, break it where we think it sucks", which isn't exactly a clear statement, but lead me to conclude that it might make sense to check what posix does, if anything, because everything else is user space, e.g. GNU (coreutils, adduser) and thus isn't tied to Linux. systemd should call into libc and let it deal with the username, so if any of the nsswitch backends think 0day is a valid username and returns a uidnumber, just use it and don't try to be extra clever.
- digi_owl 9y agoBest i recall, the kernel will offer POSIX compliant interfaces, but then also offer parallel interfaces that fix potential problems. Similarly they will retain previously introduced, but flawed, interfaces etc until they are damn sure that they are no longer in use.
- hahainternet 9y agoAre you reading the same thread as me? He replied explaining precisely why this is an error and received nothing but hate for it, 40 thumbs downs. On the other hand, you come here to uselessly complain and have the temerity to complain that poettering doesn't write exactly the code you want him to write. How do you justify your ridiculous attitude?
- detaro 9y agoExcept it's less than clear that this is an "invalid username", as the following comments discuss. (even leaving out things like "defaulting to root")
- hahainternet 9y ago> Except it's less than clear that this is an "invalid username" Indeed, and once that was pointed out his response was equally polite and accurate, offering a workaround which keeps everyone happy. Literally, what more do people expect?
- detaro 9y agoThe thing not being closed as "not a bug" before the situation is figured out (e.g. the opener had a user account starting with a 0, so it could be expected input) or clearer context is given (e.g. if systemd had an established policy on what a username is allowed to be, a reference to that)? While understandable (maintainers are busy people and likely have to deal with a lot of reports that have clear cut answers), it sadly fits into the image people have of them. I personally think "thumbs down" (since you referenced those) is a completely valid response to that – but to be clear, posting insults or other attacks is not!
- viraptor 9y agoStrict validation. If some option is not valid, fail loudly. And he still fails to acknowledge this is a security issue. Here's a scenario for you: You're running a SaaS which spawns restricted demons/containers per customer, separating the users by assigning them local user accounts. One day, user "0zero" registers and their account has access to your whole environment. Would you expect this? Would you not classify this as a security issue?
- mjw1007 9y agoI think you're a bit too harsh. If you maintain widely-used software, you're going to get a lot of bug reports which are in fact user error, and you don't have a great deal of time to spend on each report. So it's easy to mistakenly dismiss a report when it contains at least one user error, or even something close to a user error, even when it also exposes a real bug. (It's less forgivable to continue being loudly wrong once other people have pointed out real problems more clearly.)
- srett 9y agoI think you're a bit too harsh. Yes, that might be true. I never complained about him before "in public" so there was some steam to release. However I hope I still gave enough clear thought on how I think he is acting wrong repeatedly. (It's less forgivable to continue being loudly wrong once other people have pointed out real problems more clearly.) Which only makes it worse. There is a good deal of serious replies to the issue, but because of some trolling, the whole discussion is considered invalid by the maintainers, or at least they make it look like that by just closing it without any further comment. Only about an hour ago did poettering reply again giving some more insight, but the damage has been done and next time there will probably be even more trolling.