Find a file
Alan Jenkins 34160d9195 logind: fix SetLinger to authorize by client's effective User ID
SetLinger is authorized by the PolicyKit action "set-self-linger", if it is
not passed an explicit UID.

According to comments we were determining the default UID from the client's
session.  However, user processes e.g. which are run from a terminal
emulator do not necessarily belong to a session scope unit.  They may
equally be started from the systemd user manager [1][2].  Actually the
comment was wrong, and it would also have worked for processes
started from the systemd user manager.

Nevertheless it seems to involve fetching "augmented credentials" i.e.
it's using a racy method, so we shouldn't have been authenticating based
on it.

We could change the default UID, but that raises issues especially for
consistency between the methods.  Instead we can just use the clients
effective UID for authorization.

This commit also fixes `loginctl enable-linger $USER` to match the docs
that say it was equivalent to `loginctl enable-linger` (given that $USER
matches the callers user and owner_uid).  Previously, the former would not
have suceeded for unpriviliged users in the default configuration.

[1] It seems the main meaning of per-session scopes is tracking the PAM
login process.  Killing that provokes logind to revoke device access.  Less
circularly, killing it provokes getty to hangup the TTY.

[2] User units may be started with an environment which includes
XDG_SESSION_ID (presuambly GNOME does this?).  Or not.
2017-11-14 18:15:33 +00:00
.github CONTRIBUTING: stop mentioning "make check" 2017-08-21 09:47:07 +02:00
.mkosi mkosi.arch: fix comment (#6470) 2017-07-28 09:24:12 +02:00
catalog catalog,po: update Russian translation (#7041) 2017-10-10 09:44:52 +02:00
coccinelle tree-wide: use !IN_SET(..) for a != b && a != c && … 2017-10-02 13:09:56 +02:00
docs build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
factory/etc factory: remove broken pam_limits 2014-07-30 15:21:54 +02:00
hwdb hwdb: Add accelerometer orientation entry for Chuwi Hi8 Pro tablet (#6998) 2017-10-05 01:06:55 +02:00
man logind: fix SetLinger to authorize by client's effective User ID 2017-11-14 18:15:33 +00:00
modprobe.d modprobe.d: expand drop-in to handle dummy0 as well (#7099) 2017-10-16 17:17:47 +02:00
network build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
po l10n: update Czech Translation (#7049) 2017-10-10 21:52:52 +02:00
rules rules: Add MODEL_ID for NVMe device (#7037) 2017-10-10 10:03:38 +02:00
shell-completion systemctl: clarify --global, --root and --runtime options (#7071) 2017-10-12 08:14:25 +02:00
src logind: fix SetLinger to authorize by client's effective User ID 2017-11-14 18:15:33 +00:00
sysctl.d build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
system-preset build-sys: drop automake support 2017-07-18 10:04:44 -04:00
sysusers.d sysusers: do not create unneeded users 2017-10-06 16:06:47 +09:00
test test-execute: always use /bin/sh 2017-10-12 13:26:39 +09:00
tmpfiles.d tmpfiles: remove old ICE and X11 sockets at boot (#6979) 2017-10-06 01:28:19 +02:00
tools hwdb: switch meson to use ids_parser.py (#6964) 2017-10-04 19:32:59 +02:00
units mount: make sure we unmount tmpfs mounts before we deactivate swaps (#7076) 2017-10-16 16:15:05 +02:00
xorg login: support user-bus on dbus1 2015-08-31 18:12:37 +02:00
.dir-locals.el meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
.editorconfig editorconfig: add rule for meson.build files (#6671) 2017-08-28 16:37:23 +02:00
.gitattributes git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore gitignore: ignore output file of mkid (#7081) 2017-10-13 10:17:43 +02:00
.mailmap update .mailmap a bit more 2017-10-05 17:39:50 +02:00
.travis.yml remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
.vimrc vimrc: fix indentation logic for our docbook xml files 2016-04-29 12:23:34 +02:00
.ycm_extra_conf.py ycm: update flag blacklist 2014-06-04 15:41:10 -04:00
CODING_STYLE tree-wide: set SA_RESTART for signal handlers we install 2016-12-01 12:41:17 +01:00
configure build-sys: add basic support for ./configure && make && make install 2017-07-18 10:05:06 -04:00
DISTRO_PORTING DISTRO_PORTING: document that distros may/should change fallback DNS as well as fallback NTP if they wish 2017-07-24 11:49:16 +02:00
ENVIRONMENT.md documentation: document nss-systemd's internal environment variables in ENVIRONMENT.md 2017-09-22 15:24:55 +02:00
HACKING HACKING: update for meson 2017-07-18 10:05:06 -04: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 build-sys: Fix Makefile wrapper for install target (#6548) 2017-08-07 11:29:20 +02:00
meson.build meson: fix feature list (#7011) 2017-10-06 09:33:21 +02:00
meson_options.txt Merge pull request #6420 from keszybz/gateway-name 2017-08-01 09:43:41 +02:00
mkosi.build mkosi: when the build fails, show its log output, and propagate error 2017-09-22 15:24:55 +02:00
mkosi.default mkosi: create .mkosi directory 2016-10-06 11:53:58 -04:00
NEWS NEWS: patch in today's date for the 235 release 2017-10-06 10:18:04 +02:00
README build-sys: require libmount >= 2.30 (#6795) 2017-09-15 14:47:57 +02:00
README.md README: include small graphs of open issues and pull requests (#5576) 2017-03-13 08:10:04 +01:00
TODO namespace: fall back gracefully when kernel doesn't support network namespaces (#7024) 2017-10-10 09:46:13 +02:00

systemd - System and Service Manager

Count of open issues over time Count of open pull requests over time 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.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the HACKING file for information how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.