1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
The systemd System and Service Manager
Go to file
Simon McVittie 71161305f1 logind: save /run/systemd/users/UID before starting user@.service
Previously, this had a race condition during a user's first login.
Some component calls CreateSession (most likely by a PAM service
other than 'systemd-user' running pam_systemd), with the following
results:

- logind:
  * create the user's XDG_RUNTIME_DIR
  * tell pid 1 to create user-UID.slice
  * tell pid 1 to start user@UID.service

Then these two processes race:

- logind:
  * save information including XDG_RUNTIME_DIR to /run/systemd/users/UID

- the subprocess of pid 1 responsible for user@service:
  * start a 'systemd-user' PAM session, which reads XDG_RUNTIME_DIR
    and puts it in the environment
  * run systemd --user, which requires XDG_RUNTIME_DIR in the
    environment

If logind wins the race, which usually happens, everything is fine;
but if the subprocesses of pid 1 win the race, which can happen
under load, then systemd --user exits unsuccessfully.

To avoid this race, we have to write out /run/systemd/users/UID
even though the service has not "officially" started yet;
previously this did an early-return without saving anything.
Record its state as OPENING in this case.

Bug: https://github.com/systemd/systemd/issues/232
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-06-17 17:04:26 +01:00
catalog l10n: Add Belarusian translation 2015-06-15 00:13:43 +03:00
docs remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
factory/etc factory: remove broken pam_limits 2014-07-30 15:21:54 +02:00
hwdb hwdb: Update database of Bluetooth company identifiers 2015-06-15 11:28:15 +02:00
m4 remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
man Merge pull request #221 from utezduyar/man-cgtop-explain-max-cpu 2015-06-17 15:48:31 +02:00
network network: fix 'LinkLocal' -> 'LinkLocalAddressing' in network files 2015-02-14 15:31:26 +01:00
po Merge pull request #154 from dmedri/master 2015-06-15 14:43:15 +02:00
rules rules: re-add cciss rules 2015-06-10 15:49:41 -07:00
shell-completion zsh-completion: optimize _filter_units_by_property 2015-06-06 12:54:41 +02:00
src logind: save /run/systemd/users/UID before starting user@.service 2015-06-17 17:04:26 +01:00
sysctl.d sysctl: add some hints how to override settings 2015-02-26 19:07:38 -05:00
system-preset preset: enable machines.target by default 2014-12-29 17:36:57 +01:00
sysusers.d build-sys: configure the list of system users, files and directories 2014-11-30 23:50:19 -05:00
test sysv-generator test: always log to console 2015-06-15 08:59:44 +02:00
tmpfiles.d tmpfiles: automatically remove old machine snapshots at boot 2015-06-15 19:28:55 +02:00
tools compile-unifont: Python 2 compatibility 2015-01-26 23:56:34 -05:00
units Revert "hwdb: actually search /run/udev/hwdb.d" 2015-06-09 11:26:06 +02:00
xorg push xorg information to the systemd --user instance 2015-01-09 21:39:31 +01:00
.dir-locals.el Keep emacs configuration in one configuration file. 2011-03-08 01:53:46 +01:00
.gitattributes git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore firewall: rename fw-util.[ch] → firewall-util.[ch] 2015-06-15 14:08:02 +02:00
.mailmap prepare NEWS 2014-02-18 02:51:47 +01:00
.travis.yml remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
.vimrc vimrc: disable -fdiagnostics-color output 2013-10-20 04:29:39 +02:00
.ycm_extra_conf.py ycm: update flag blacklist 2014-06-04 15:41:10 -04:00
autogen.sh build-sys: Recommend --with-rootprefix=/ for split-usr 2015-06-03 07:34:42 -07:00
CODING_STYLE Stop talking about the "XDG" version of basename() 2015-06-17 11:23:46 +01:00
configure.ac build-sys: Drop include_prefix 2015-06-14 20:49:14 +02:00
DISTRO_PORTING DISTRO_PORTING: add full path for /usr/lib/systemd/systemd and fix grammar 2014-12-02 16:12:37 +01:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile-man.am man: add libudev man-pages (skeletons) 2015-06-17 15:22:49 +02:00
Makefile.am build-sys: hide magic section variables from exported symbols 2015-06-17 07:29:15 +02:00
NEWS systemctl: drop hardcoded chkconfig invocation 2015-05-28 19:42:45 +02:00
README build-sys: split internal basic/ library from shared/ 2015-06-11 10:52:46 +02:00
README.md README.md: add Coverity scan status badge 2015-06-08 13:26:54 +02:00
TODO update TODO 2015-06-17 15:40:51 +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