SHA256
1
0
forked from pool/systemd
systemd/0002-login-set-pos-slot-to-fallback-on-pos-eviction.patch
Stephan Kulow bbba62be60 Accepting request 225408 from Base:System
- Add or port upstream bugfix patches: 
  0001-Fix-systemd-stdio-bridge-symlink.patch
  0002-execute-free-directory-path-if-we-fail-to-remove-it-.patch
  0003-Do-not-print-invalid-UTF-8-in-error-messages.patch
  0004-man-document-missing-options-of-systemd-run.patch
  0005-systemd-run-add-some-extra-safety-checks.patch
  0006-journal-assume-that-next-entry-is-after-previous-ent.patch
  0007-journal-forget-file-after-encountering-an-error.patch
  0008-core-correctly-unregister-PIDs-from-PID-hashtables.patch
  0009-logind-fix-reference-to-systemd-user-sessions.servic.patch
  0010-man-update-link-to-LSB.patch
  0011-man-systemd-bootchart-fix-spacing-in-command.patch
  0012-man-add-missing-comma.patch
  0013-units-Do-not-unescape-instance-name-in-systemd-backl.patch

- Add linker scripts as place holder of the old systemd shared
  libraries now all included in libsystemd.so  (bnc#867128)

- Make patch 1006-udev-always-rename-network.patch work again
  and add it again. 

- address missing owner functionality in systemd-tmpfiles (fate#314974)
  1022-systemd-tmpfiles-ownerkeep.patch

- Generate the bash completion files on the fly for the case of
  not having the package bash-completion around 
- Add or port upstream bugfix patches:
  0001-nspawn-fix-detection-of-missing-proc-self-loginuid.patch
  0002-cdrom_id-use-the-old-MMC-fallback.patch
  0003-journalctl-refuse-extra-arguments-with-verify-and-si.patch

OBS-URL: https://build.opensuse.org/request/show/225408
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=177
2014-03-11 08:24:11 +00:00

53 lines
1.9 KiB
Diff

From 3e6b205f81e743c7354ccbc69eb45afbdbebe2dc Mon Sep 17 00:00:00 2001
From: David Herrmann <dh.herrmann@gmail.com>
Date: Tue, 25 Feb 2014 13:08:24 +0100
Subject: [PATCH] login: set pos-slot to fallback on pos-eviction
If we evict a session position, we open the position slot for future
sessions. However, there might already be another session on the same
position if both were started on the same VT. This is currently done if
gdm spawns the session on its own Xserver.
Hence, look for such a session on pos-eviction and claim the new slot
immediately.
---
src/login/logind-seat.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git src/login/logind-seat.c src/login/logind-seat.c
index 36ec7ed..96cf08e 100644
--- src/login/logind-seat.c
+++ src/login/logind-seat.c
@@ -459,6 +459,7 @@ int seat_stop_sessions(Seat *s, bool force) {
}
void seat_evict_position(Seat *s, Session *session) {
+ Session *iter;
unsigned int pos = session->pos;
session->pos = 0;
@@ -466,8 +467,19 @@ void seat_evict_position(Seat *s, Session *session) {
if (!pos)
return;
- if (pos < s->position_count && s->positions[pos] == session)
+ if (pos < s->position_count && s->positions[pos] == session) {
s->positions[pos] = NULL;
+
+ /* There might be another session claiming the same
+ * position (eg., during gdm->session transition), so lets look
+ * for it and set it on the free slot. */
+ LIST_FOREACH(sessions_by_seat, iter, s->sessions) {
+ if (iter->pos == pos) {
+ s->positions[pos] = iter;
+ break;
+ }
+ }
+ }
}
void seat_claim_position(Seat *s, Session *session, unsigned int pos) {
--
1.7.9.2