Systemd/src
Djalal Harouni 8fe63cd4f1 logind: close race on session state during logins
At login there is a small race window where session_get_state() will
return SESSION_ACTIVE instead of SESSION_OPENING. This must be fixed
since during that time there are calls to session_save() to save
session states and we want to write the correct state.

When we queue the start scope and service jobs, we wait for both of them
to finish before calling and continue processing in:
"session_jobs_reply() => session_send_create_reply()"
to create the session fifo and notify clients.

However, in the match_job_removed() D-Bus signal, we may hit situations
where the scope job has successfully finished and we are still waiting
for the user service job to finish. During that time the
"session->scope_job" will be freed and set to NULL, this makes
session_get_state() return SESSION_ACTIVE before it is really active, it
should return SESSION_OPENING since we are still waiting for the service
job to finish in order to create the session fifo.

To fix this, we also check if the session fifo fd was created, if so then
the session has entered the SESSION_ACTIVE state, if not then it is still
in the SESSION_OPENING state and it is waiting for the scope and service
jobs to finish.
2014-02-17 02:26:22 -05:00
..
ac-power
activate acticate: rename --environment to --setenv 2013-12-30 00:17:15 -05:00
analyze analyze: fix plot issues when using gummiboot 2014-01-31 07:12:43 +01:00
ask-password clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
backlight Remove duplicate includes 2013-11-18 20:28:55 -05:00
binfmt log: log_error() and friends add a newline after each line anyway, so avoid including it in the log strings 2013-12-24 16:39:37 +01:00
boot use memzero(foo, length); for all memset(foo, 0, length); calls 2014-01-31 11:55:01 +01:00
bootchart everywhere: always use O_CLOEXEC where it makes sense 2014-02-13 14:59:56 +01:00
bus-driverd includes: remove duplicate includes 2014-02-10 13:06:31 +01:00
bus-proxyd use memzero(foo, length); for all memset(foo, 0, length); calls 2014-01-31 11:55:01 +01:00
cgls clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
cgroups-agent cgroups-agent: down-grade log level 2013-11-25 17:40:53 +01:00
cgtop build-sys: minor fixes found with cppcheck 2013-12-25 19:00:38 +01:00
compat-libs build-sys: update .pc.in files 2014-01-25 18:55:58 -05:00
core Add white space between _XZ_FEATURE_ and _SECCOMP_FEATURE_ 2014-02-16 11:44:16 -05:00
cryptsetup cryptsetup-generator: auto add deps for device as password 2014-02-08 13:53:02 -05:00
dbus1-generator dbus1-generator: use XDG_RUNTIME_DIR instead of /run/user/%lu/ 2014-01-26 18:09:24 +01:00
delta delta: ensure that d_type will be set on every fs 2014-01-09 16:43:00 +01:00
detect-virt clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
efi-boot-generator efi-boot-generator: don't mount /boot eagerly 2013-11-21 12:36:05 +01:00
fsck everywhere: always use O_CLOEXEC where it makes sense 2014-02-13 14:59:56 +01:00
fstab-generator fstab-generator: Create fsck-root symlink with correct path 2014-02-10 11:59:07 +01:00
getty-generator s390/getty-generator: initialize essential system terminals/consoles 2014-01-31 18:16:36 +01:00
gpt-auto-generator gpt-auto-generator: use EBADSLT code when unable to detect partition type 2014-01-11 16:50:09 -05:00
gudev
hostname bus: fix exit-on-idle for driverd 2013-12-19 22:18:39 +01:00
initctl trivial coding style clean ups 2013-12-03 22:27:45 +01:00
journal journald: log provenience of signals 2014-02-11 19:14:47 -05:00
kernel-install kernel-install: fix help output 2013-12-09 23:19:16 -05:00
libsystemd sd-rtnl: do not require ifindex to be set for SETLINK messages 2014-02-16 23:17:19 +01:00
libsystemd-daemon use memzero(foo, length); for all memset(foo, 0, length); calls 2014-01-31 11:55:01 +01:00
libsystemd-dhcp sd-dhcp: silently ignore malformed packets 2014-02-16 23:28:19 +01:00
libudev everywhere: make use of new0() and macro() macros, and stop using perror() 2014-02-13 14:45:51 +01:00
locale localectl: log error if bus_map_all_properties() fails 2014-02-14 02:19:42 +01:00
login logind: close race on session state during logins 2014-02-17 02:26:22 -05:00
machine machinectl: add new "machinectl reboot" call 2014-02-12 02:11:00 +01:00
machine-id-setup clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
modules-load Remove unused variables 2014-01-05 09:16:15 -05:00
network sd-rtnl: always include linux/rtnetlink.h 2014-02-15 12:14:45 +01:00
notify clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
nspawn nspawn: typo fix in help 2014-02-16 22:15:24 +01:00
nss-myhostname Remove duplicate includes 2013-11-18 20:28:55 -05:00
python-systemd util: use alloca0() intead of alloca() + memzero() 2014-01-31 17:48:36 +01:00
quotacheck util: unify reading of /proc/cmdline 2013-11-06 03:15:16 +01:00
random-seed random-seed: improve debugging messages a bit 2013-11-15 22:53:14 -05:00
rc-local-generator rc-local: use access(X_OK) to check if files are executable 2013-10-29 19:34:59 +01:00
readahead util: use alloca0() intead of alloca() + memzero() 2014-01-31 17:48:36 +01:00
remount-fs Introduce _cleanup_endmntent_ 2013-10-03 22:13:55 -04:00
reply-password Use initalization instead of explicit zeroing 2013-04-05 19:50:57 -04:00
rfkill rfkill: Avoid error when state restore is disabled 2013-12-06 16:44:38 +01:00
run nspawn: add --quiet switch for turning off any output noise 2014-02-06 00:43:14 +01:00
shared Fix prototype of get_process_state 2014-02-14 23:15:42 -05:00
shutdownd Update some message formats 2014-02-05 19:00:36 -05:00
sleep sleep.c: fix typo 2014-01-07 21:54:28 -05:00
socket-proxy event: be more conservative when returning errors from event handler callbacks 2013-12-13 04:06:43 +01:00
sysctl Remove unused variables 2014-01-05 09:16:15 -05:00
system-update-generator Standarize on one spelling of symlink error message 2013-04-24 00:25:04 -04:00
systemctl systemctl: fix exit statuses from is-active/is-failed 2014-02-13 10:14:31 -05:00
systemd sd-rtnl: always include linux/rtnetlink.h 2014-02-15 12:14:45 +01:00
test syscallfilter: port to libseccomp 2014-02-12 18:30:36 +01:00
timedate bus: fix exit-on-idle for driverd 2013-12-19 22:18:39 +01:00
tmpfiles tmpfiles: fix memory leak of exclude_prefixes 2014-01-30 22:53:01 -05:00
tty-ask-password-agent clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
udev everywhere: always use O_CLOEXEC where it makes sense 2014-02-13 14:59:56 +01:00
update-utmp utmp: make sure we don't write the utmp reboot record twice on each boot 2014-01-30 14:18:46 +01:00
vconsole move _cleanup_ attribute in front of the type 2013-04-18 09:11:22 +02:00
.gitignore Add test coverage and generate report with lcov 2013-07-13 21:56:33 -04:00
Makefile