News for hackers. Stuff that matters.
Re:Systemd as tragedy by izacus on Tuesday January 29, 2019 @05:43AM (#19025327)
Killing software that might be running after a valid login session is a sane default.
Re:Systemd as tragedy by inferiorhuman on Tuesday January 29, 2019 @05:45AM (#19025338)
And that's what SIGHUP is for. The process will exit by default. If that's not the desired behavior a handler can be registered. Killing things that are explicitly designed to run after logout is a piss poor default.
Re:Systemd as tragedy by poettering on Tuesday January 29, 2019 @07:19AM (#19025711)
We send SIGHUP btw. The kernel's own sending of SIGHUP is bound to the TTY concept btw, which is specific to TTY logins only, not graphical ones.

That said the question is not so much about who sends what, but more about whether a secure system should allow user code to escape lifecycle management or whether logging out means logging out and giving up all resources.

Re:Systemd as tragedy by tyingq on Tuesday January 29, 2019 @07:40AM (#19025826)
I get what you're saying. However, I'd probably apply the kernel rule of "when maintaining the kernel, do not do something which breaks user programs/applications". Yes, this isn't the kernel, but it's comparable in being a core function that heavily affects userland stuff.
Re:Systemd as tragedy by pas on Wednesday January 30, 2019 @05:40AM (#19034058)
Sometimes the ole way o' logg out is just insecure. And there is no way to conjure up a new backward compatible and secure way. cgroups work well, especially because they are not opt-in. That means programs daemonizing either has to set themselves up as a system service or start a new logind scope (or PAM session, etc. which translates to escaping the cgroup, which requires user approval to remain secure).
Re:Systemd as tragedy by inferiorhuman on Tuesday January 29, 2019 @03:24PM (#19029513)
> more about whether a secure system should allow user code to escape lifecycle management

Please stop trotting that tired old line out. It is simply untrue. Systemd does the exact opposite of providing increased security. If nothing else the greatly increased surface area of systemd makes for a less secure system.

The pwnie articulates a number of other ways in which your code and your behavior are actively reducing the security of Linux.

Re:Systemd as tragedy by onlydeadheroes on Wednesday January 30, 2019 @05:09AM (#19033916)
I know right, I run openvpn as user nobody and I keep thinking that nobody user better stay logged in!
Re:Systemd as tragedy by v_lisivka on Tuesday January 29, 2019 @07:44AM (#19025845)
If you created a problem, it's your duty to provide a workaround or a solution to the problem. Why not provide systemd specific version of `nohup` for such cases and encourage users to use it instead of old and insecure version?
Re:Systemd as tragedy by tyingq on Tuesday January 29, 2019 @07:09AM (#19025670)
This. There's a reason the defacto way to keep running post logout was named "nohup". This wasn't some deep dark unknown secret behaviour that was broken.
Re:Systemd as tragedy by zbentley on Tuesday January 29, 2019 @08:35PM (#19031768)
It was called that because connected pty devices could hang up. Whether hanging up due to intentional logout or actually hanging up the modem was, and is, left as an exercise to the user. Unless we try to disambiguate it via login/pty manager programs, that is.
Re:Systemd as tragedy by v_lisivka on Tuesday January 29, 2019 @08:19AM (#19026018)
Because 1) maintainer can be overloaded, so (s)he will stick to defaults, 2) maintainer needs a logical reason to change default setting to something else, which is not obvious in most cases. Maintainer is not a QA team.