Systemd/src/login
Alan Jenkins 8150acb160 login: log session state "closing" (as well as New/Removed)
Let's show a message at the time of logout i.e. entering the "closing"
state, not just e.g. once the user closes `tmux` and the session can be
removed completely.  (At least when KillUserProcesses=no applies.  My
thinking was we can spare the log noise if we're killing the processes
anyway).

These are two independent events.  I think the logout event is quite
significant in the session lifecycle.  It will be easier for a user who
does not know logind details to understand why "Removed session" doesn't
appear at logout time, if we have a specific message we can show at this
time :).

Tested using tmux and KillUserProcesses=no.  I can also confirm the extra
message doesn't show when using KillUserProcesses=yes.  Maybe it looks a
bit mysterious when you use KillOnlyUsers= / KillExcludeUsers=, but
hopefully not alarmingly so.


I was looking at systemd-logind messages on my system, because I can
reproduce two separate problems with Gnome on Fedora 28 where
sessions are unexpectedly in state "closing".  (One where a GUI session
limps along in a degraded state[1], and another where spice-vdagent is left
alive after logout, keeping the session around[2]).  It logged when
sessions were created and removed, but it didn't log when the session
entered the "closing" state.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1583240#c1
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1583261

Closes #9096
2018-06-04 11:31:11 +02:00
..
70-power-switch.rules Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
70-uaccess.rules rules: add a missing comma in 70-uaccess.rules since it improves readability 2018-02-27 14:37:01 +01:00
71-seat.rules.in Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
73-seat-late.rules.m4 login/meson.build: require ACL for uaccess rules 2018-01-27 10:55:32 +01:00
inhibit.c inhibit: use pager for systemd-inhibit --list 2018-05-18 08:33:45 +02:00
loginctl.c Use const char* for timestamp strings which we don't plan to modify 2018-05-31 14:30:23 +02:00
logind-acl.c tree-wide: drop redundant _cleanup_ macros (#8810) 2018-04-25 12:31:45 +02:00
logind-acl.h tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
logind-action.c Merge pull request #8700 from keszybz/hibernation 2018-04-11 10:26:27 +02:00
logind-action.h tree-wide: port over all code to the new CONFIG_PARSER_PROTOTYPE() macro 2018-05-22 13:18:44 +02:00
logind-button.c tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
logind-button.h tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
logind-core.c logind: modernize Manager object allocation and freeing 2018-04-27 18:11:13 +02:00
logind-dbus.c logind: let's change the type of the runtime directory size to uint64_t 2018-05-24 12:14:48 +02:00
logind-device.c tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
logind-device.h tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
logind-gperf.gperf Use a dash-truncated drop-in for user-%j.slice configuration 2018-04-25 16:18:45 +02:00
logind-inhibit.c fileio: accept FILE* in addition to path in parse_env_file() 2018-05-24 17:01:57 +02:00
logind-inhibit.h tree-wide: remove some double newlines in headers, too 2018-05-22 16:13:45 +02:00
logind-seat-dbus.c login: use BUS_DEFINE_PROPERTY_GET* macros 2018-05-15 23:07:02 +09:00
logind-seat.c tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
logind-seat.h tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
logind-session-dbus.c login: use BUS_DEFINE_PROPERTY_GET* macros 2018-05-15 23:07:02 +09:00
logind-session-device.c tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
logind-session-device.h tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
logind-session.c login: log session state "closing" (as well as New/Removed) 2018-06-04 11:31:11 +02:00
logind-session.h logind: enable limiting of user session scopes using pam context objects (#8397) 2018-04-17 16:42:44 +02:00
logind-user-dbus.c login: use BUS_DEFINE_PROPERTY_GET* macros 2018-05-15 23:07:02 +09:00
logind-user.c fileio: accept FILE* in addition to path in parse_env_file() 2018-05-24 17:01:57 +02:00
logind-user.h tree-wide: port over all code to the new CONFIG_PARSER_PROTOTYPE() macro 2018-05-22 13:18:44 +02:00
logind-utmp.c tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
logind.c logind: fix borked r check 2018-05-10 01:37:49 +02:00
logind.conf.in Use a dash-truncated drop-in for user-%j.slice configuration 2018-04-25 16:18:45 +02:00
logind.h logind: let's change the type of the runtime directory size to uint64_t 2018-05-24 12:14:48 +02:00
meson.build meson: generate m4 preprocessor from config.h (#8914) 2018-05-07 11:17:35 +02:00
org.freedesktop.login1.conf Rename suspend-to-hibernate to suspend-then-hibernate 2018-03-28 15:11:10 -05:00
org.freedesktop.login1.policy meson: drop unnecessary "transformation" of policy files 2018-02-16 13:01:12 +01:00
org.freedesktop.login1.service Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
pam_systemd.c logind: enable limiting of user session scopes using pam context objects (#8397) 2018-04-17 16:42:44 +02:00
pam_systemd.sym Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
sysfs-show.c tree-wide: drop redundant _cleanup_ macros (#8810) 2018-04-25 12:31:45 +02:00
sysfs-show.h tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
systemd-user.m4 pam: include pam_keyinit.so in our PAM fragments 2016-12-13 20:59:36 +01:00
test-inhibit.c tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
test-login-shared.c tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
test-login-tables.c tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
user-runtime-dir.c logind: split %t directory creation to a helper unit 2018-04-25 16:20:28 +02:00