[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

systemd compatibility patch for openbsd

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 33
Thread images: 4

File: image.png (256KB, 358x459px) Image search: [Google]
image.png
256KB, 358x459px
List: openbsd-tech
Subject: systemd compat for doas
From: "Ted Unangst" <tedu () tedunangst ! com>
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;
}
>>
File: 1476779071322.png (1MB, 1282x747px) Image search: [Google]
1476779071322.png
1MB, 1282x747px
rofl.
>>
>what happens when you hire millenials
>>
>>61212775
Jesus fucking christ.
>>
>>61212775
>If the username starts with a digit, but isn't a number, treat it like root.
Why would you do that?
>>
File: 1487281034086.jpg (96KB, 1280x720px) Image search: [Google]
1487281034086.jpg
96KB, 1280x720px
>>
>>61212937
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.
>>
>>61212775
lmao
>>
>>61213029
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?
>>
>>61213052
For openbsd it's an obvious joke. It's not for systemd though.
>>
>>61213029
>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.
>>
>>61213059
It's a joke. There is no systemd on BSD.
>>
File: Capture.png (40KB, 303x141px) Image search: [Google]
Capture.png
40KB, 303x141px
>>61213052
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.

>>61213065
Tell that to the systemd developers and they'll show you why you're wrong. Picture related, systemd is perfecto.
>>
>>61213065
>not fail deadly
woah dude
where do you think you are
this is software, not hardware
>>
>>61213029
poettering is a massive faggot but if you can write to .service files in etc shits already fucked
>>
>>61213132
>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.
>>
>>61213172
hopefully kbus will be accepted and wipe out all the dbus red hat trash
>>
>>61213240
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.
>>
>>61213340
>He doesn't know what POSIX is,
GNU/Linux is not POSIX-compliant anyway. Even if you rip out all of Poettering's code.
>>
>>61213172
>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.
>>
>>61213406
It's pretty much POSIX compliant except for some irrelevant shit like having help flags for "true".
>>
>>61212775
i'm sure some anon is gonna take this VERY seriously
>>
>>61213455
If you admit that the differences are "irrelevant", then stop crying about Poettering not caring about POSIX compliance, since the results are irrelevant, anyway.
>>
>>61213499
>root privileges for normal users
>irrelevant
>>
>>61213340
pulseaudio got so much better when that hack stopped working on it

unfortunately it's still suffering from retarded design
>>
>>61212775
Ted has a long history of making joke commits to OpenBSDs CVS history. It's good stuff.
>>
>>61213267
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 /g/ with systemd fud.
Thread posts: 33
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.