David Herrmann 2d7c6aa20c core: make setup_pam() synchronous
If we spawn a unit with a non-empty 'PAMName=', we fork off a
child-process _inside_ the unit, known as '(sd-pam)', which watches the
session. It waits for the main-process to exit and then finishes it via
pam_close_session(3).

However, the '(sd-pam)' setup is highly asynchronous. There is no
guarantee that process gets spawned before we finish the unit setup.
Therefore, there might be a root-owned process inside of the cgroup of
the unit, thus causing cg_migrate() to error-out with EPERM.

This patch makes setup_pam() synchronous and waits for the '(sd-pam)'
setup to finish before continuing. This guarantees that setresuid(2) was
at least tried before we continue with the child setup of the real unit.
Note that if setresuid(2) fails, we already warn loudly about it. You
really must make sure that you own the passed user if using 'PAMName='.
It seems very plausible to rely on that assumption.
2015-09-23 00:51:20 +02:00
2015-06-15 00:13:43 +03:00
2015-07-06 17:47:38 +02:00
2015-09-21 21:56:10 +02:00
2015-09-22 00:25:13 +02:00
2015-08-09 18:07:55 +02:00
2015-09-23 00:51:20 +02:00
2015-07-27 20:15:34 +02:00
2015-08-31 18:12:37 +02:00
2014-02-18 02:51:47 +01:00
2015-06-03 00:22:53 +02:00
…
2014-06-04 15:41:10 -04:00
2015-07-27 20:15:34 +02:00
2015-09-22 13:30:12 +02:00
2015-09-22 17:42:59 +02:00

systemd - System and Service Manager

Build Status
Coverity Scan Status

Details

  • General information about systemd can be found in the systemd Wiki
  • Information about build requirements are provided in the README file
S
Description
systemd patched fork
Readme
409 MiB
Languages
C 88.5%
Shell 5.7%
Python 4.6%
Meson 1.1%