Systemd 256.1 Maintenance Release Fixes Home Directory Deletion Bug (debugpointnews.com)
from petsoi@discuss.tchncs.de to linux@lemmy.ml on 20 Jun 19:56
https://discuss.tchncs.de/post/17676101

It’s actually not a bug, but obvious behavior.

#linux

threaded - newest

mesamunefire@lemmy.world on 20 Jun 20:23 next collapse

Yeah that’s a big one.

ogeist@lemmy.world on 20 Jun 20:44 collapse

Oops

AProfessional@lemmy.world on 20 Jun 20:23 next collapse

TL;DR for anybody worried. systemd-tmpfiles --purge was too broad in scope (and has a confusing name) so now you must be more specific when using it to avoid accidentally deleting things.

slacktoid@lemmy.ml on 21 Jun 15:02 collapse

But you should have read the docs completely and figured that out /s

clutchtwopointzero@lemmy.world on 20 Jun 20:49 next collapse

using systemd instead of rm -Rf is not the Unix way!

velox_vulnus@lemmy.ml on 20 Jun 21:11 next collapse

“Linux kernel was a blot, so here’s our new kernel, written in system-langd, compiled using systemccd using the maked build system. Normal assembly was also a blot, so we came up with sasmd. The whole hardware is a blot, so we came up with hardwared. They’re all tightly integrated. The name of the company does not vibe with our vision, so we are renaming it to ibmd. Your brain is also a blot, so here’s braind. Now you can dump that outdated, prokaryotic fleshy crap and use systemd instead.”

Imagine what would happen if one service goes down. Fucking hell, the Armageddon is real.

ryannathans@aussie.zone on 20 Jun 23:37 next collapse

Thanks Microsoft

drwho@beehaw.org on 21 Jun 16:00 collapse

I’ve been saying, Microsoft hired Poettering to thank him for fucking up Linux so much with systemd.

Templa@beehaw.org on 21 Jun 01:07 next collapse

If it was intended but not properly documented as it says, why does it keep being called a bug?

cerement@slrpnk.net on 21 Jun 02:46 next collapse

it was clearly a feature

dgriffith@aussie.zone on 21 Jun 05:27 next collapse

The bug is the lack of documentation and that a simple unguarded command can erase all user’s data on the system.

Also, the principle of least surprise would like a word.

If I look at the command line arguments of a program called “systemd-tmpfiles” and one of them is called “purge” I will generally assume that option will purge temporary files.

Now it turns out that someone decided that this program would be a simple way to do something with /home directories(*) so they included /home in the config file for the program, the file that the program reads by default when it is invoked.

Who decided it would be a good idea for it to deal with /home?

Wellllll…

github.com/systemd/systemd/blob/main/…/home.conf

(*)I have no idea what this program is doing with /home in its config file. I will presume that there is a useful and mostly logical reason for it, and that this command line option was just an unfortunate footgun for those users who were not intimately familiar with systemd.

NekkoDroid@programming.dev on 21 Jun 07:02 next collapse

There were talks a few years ago about changing sd-tmpfiles name but it was decide not worth it due to the churn and bikeshedding it would cause.

sd-tmpfiles is generally used to create, modify (e.g. permissions) and remove directories on the system. The home.conf is intended for systems that only ship /usr/ (e.g. containers) to create /home/ and /srv/ as a separate subvolume on btrfs

MyNameIsRichard@lemmy.ml on 21 Jun 10:10 collapse

I will presume that there is a useful and mostly logical reason for it

Home directories are temporary, obviously

Bitrot@lemmy.sdf.org on 21 Jun 14:49 collapse

“Breaking userspace” is often considered a bug even if the code doing so is working as intended. Deleting user data because they bundle a config file deep in the directory tree for a completely different use case was not intended behavior even if one of them is defensive about the logic.

kenkenken@sh.itjust.works on 21 Jun 04:31 next collapse

a “bug”

MonkderDritte@feddit.de on 21 Jun 09:34 next collapse

So it doesn’t break userspace anymore?

lengau@midwest.social on 21 Jun 10:43 next collapse

<img alt="" src="https://midwest.social/pictrs/image/21af4cd0-a8ce-45f4-9bce-aa512b008e5e.jpeg">

bloodfart@lemmy.ml on 21 Jun 15:06 collapse

Oh that’s a good normal thing for it to do.