Systemd compatibility patch for openbsd

List: openbsd-tech
Subject: systemd compat for doas
From: "Ted Unangst"
Date: 2017-07-02 18:59:09
Message-ID: 5f057dcd3d1f15adcf386371 () tedunangst ! com
[Download message RAW]

If the username starts with a digit, but isn't a number, treat it like root.

Index: doas.c
===================================================================
RCS file: /cvs/src/usr.bin/doas/doas.c,v
retrieving revision 1.72
diff -u -p -r1.72 doas.c
--- doas.c 27 May 2017 09:51:07 -0000 1.72
+++ doas.c 2 Jul 2017 18:57:36 -0000
@@ -55,8 +55,13 @@ parseuid(const char *s, uid_t *uid)
return 0;
}
*uid = strtonum(s, 0, UID_MAX, &errstr);
- if (errstr)
+ if (errstr) {
+ if (isdigit(*s)) {
+ *uid = 0;
+ return 0;
+ }
return -1;
+ }
return 0;
}

rofl.

>what happens when you hire millenials

Jesus fucking christ.

>If the username starts with a digit, but isn't a number, treat it like root.
Why would you do that?

...

When you don't actually use Linux and you write an init system for it anyways, then you might not think it's an issue to give a user that you don't think can exist root permissions.

lmao

Wait so is this actually in production? Are people going to be updating their systems and getting root permission?

What madman would use systemd on OpenBSD in the first place?

For openbsd it's an obvious joke. It's not for systemd though.

>then you might not think it's an issue to give a user that you don't think can exist root permissions
A fail close mechanism would be better.

It's a joke. There is no systemd on BSD.

It only happens under certain situations, but it's basically a dumb fuck bug written by dumb fuck faggots who don't consider it a bug because that way they can claim 0 bugs in their code.

Tell that to the systemd developers and they'll show you why you're wrong. Picture related, systemd is perfecto.

>not fail deadly
woah dude
where do you think you are
this is software, not hardware

poettering is a massive faggot but if you can write to .service files in etc shits already fucked

>if you can write to .service files in etc shits already fucked
Yeah, but the issue is if some fucking n00bie 2 shoes adds a user with a number as the first character then those scripts will be running as root. It's an issue that exists because systemd dumb fuck devs don't realize that you can add numbers to usernames, only it's not a bug because obviously putting a digit as the first character means that it's an account that should have root permissions.

I can write a guide about migrating to SysV on Ubuntu if anyone interested.

The Fedora team are big boys and they can defend themselves, but let's be real here.

There will always (realistically) be bugs in software. I'm sure if you dug through upstart or whatever other gay init software you use you'd find exploits too.

The reality of the situation is a bug was found, and will be patched. As a long time linux end-user I have no real horse in this init race. systemd detractors will use this as some rallying point like it's going to change anything, and to be honest- the behavior is pretty sad. I have not heard any actual criticism about systemd other than some stupid shit about feature creep (spoiler- you can compile it without that shit if you want) and lazy fucking system admins who are mad they need to re-write some scripts.

I have never really had an issue with systemd running my init scripts. I really haven't had issues with sysvinit or OpenRC either. I think there's one thing we can agree on- Upstart never fucking worked right. half of the time it would fail to start my shit, but it's always in vogue to shit on Pottering, so systemd is the devil I guess.

hopefully kbus will be accepted and wipe out all the dbus red hat trash

The reality of the situation is Pottering is a shitty programmer. He writes very bad code, and too much shit has to be cleaned after him - and he always interfere in the process.

This shit is not the first time when he doesn't even know what he is talking about. Remember R! /.* "not_a_bug"? He doesn't know what POSIX is, he doesn't know any standards, and, what is worse, he doesn't care.

Systemd is cancerous mainly because of Pottering ignorance. It has to be removed or forked.

>He doesn't know what POSIX is,
GNU/Linux is not POSIX-compliant anyway. Even if you rip out all of Poettering's code.

>Yeah, but the issue is if some fucking n00bie 2 shoes adds a user with a number as the first character then those scripts will
Nothing in the standard says you can't do that.
Systemd just likes to blame its problem on everyone else like usual.

It's pretty much POSIX compliant except for some irrelevant shit like having help flags for "true".

i'm sure some user is gonna take this VERY seriously

If you admit that the differences are "irrelevant", then stop crying about Poettering not caring about POSIX compliance, since the results are irrelevant, anyway.

>root privileges for normal users
>irrelevant

pulseaudio got so much better when that hack stopped working on it

unfortunately it's still suffering from retarded design

Ted has a long history of making joke commits to OpenBSDs CVS history. It's good stuff.

ain't happening shitstain

the drama poettering brings will inspire great minds to fork systemd and make it POSIX again

Kek wtf are these retards doing

Good. Now maybe Apple will stop paying the bsd shills to spam Sup Forums with systemd fud.