SHA256
1
0
forked from pool/systemd

Accepting request 195987 from Base:System

This SR fixes screen locking problems in Gnome and also automatic login.

- Add patch logind_update_state_file_after_generating_the_session_fifo_not_before.patch
  to fix https://bugs.freedesktop.org/show_bug.cgi?id=67273 (forwarded request 195808 from namtrac)

OBS-URL: https://build.opensuse.org/request/show/195987
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=153
This commit is contained in:
Tomáš Chvátal 2013-08-23 09:06:04 +00:00 committed by Git OBS Bridge
parent 64180b285d
commit bb1ecefd31
5 changed files with 120 additions and 0 deletions

View File

@ -0,0 +1,96 @@
Index: systemd-206/src/login/logind-dbus.c
===================================================================
--- systemd-206.orig/src/login/logind-dbus.c
+++ systemd-206/src/login/logind-dbus.c
@@ -643,6 +643,10 @@ static int bus_manager_create_session(Ma
session->create_message = dbus_message_ref(message);
+ /* Now, let's wait until the slice unit and stuff got
+ * created. We send the reply back from
+ * session_send_create_reply().*/
+
return 0;
fail:
@@ -2356,7 +2360,6 @@ DBusHandlerResult bus_message_filter(
if (streq_ptr(path, s->scope_job)) {
free(s->scope_job);
s->scope_job = NULL;
- session_save(s);
if (s->started) {
if (streq(result, "done"))
@@ -2365,7 +2368,8 @@ DBusHandlerResult bus_message_filter(
dbus_set_error(&error, BUS_ERROR_JOB_FAILED, "Start job for unit %s failed with '%s'", unit, result);
session_send_create_reply(s, &error);
}
- }
+ } else
+ session_save(s);
}
session_add_to_gc_queue(s);
Index: systemd-206/src/login/logind-session-dbus.c
===================================================================
--- systemd-206.orig/src/login/logind-session-dbus.c
+++ systemd-206/src/login/logind-session-dbus.c
@@ -535,6 +535,10 @@ int session_send_create_reply(Session *s
if (!s->create_message)
return 0;
+ /* This is called after the session scope was successfully
+ * created, and finishes where bus_manager_create_session()
+ * left off. */
+
if (error) {
DBusError buffer;
@@ -588,6 +592,10 @@ int session_send_create_reply(Session *s
return log_oom();
}
+ /* Update the state file before we notify the client about the
+ * result */
+ session_save(s);
+
if (!dbus_connection_send(s->manager->bus, reply, NULL))
return log_oom();
Index: systemd-206/src/machine/machine-dbus.c
===================================================================
--- systemd-206.orig/src/machine/machine-dbus.c
+++ systemd-206/src/machine/machine-dbus.c
@@ -350,6 +350,10 @@ int machine_send_create_reply(Machine *m
return log_oom();
}
+ /* Update the machine state file before we notify the client
+ * about the result. */
+ machine_save(m);
+
if (!dbus_connection_send(m->manager->bus, reply, NULL))
return log_oom();
Index: systemd-206/src/machine/machined-dbus.c
===================================================================
--- systemd-206.orig/src/machine/machined-dbus.c
+++ systemd-206/src/machine/machined-dbus.c
@@ -543,7 +543,6 @@ DBusHandlerResult bus_message_filter(
if (streq_ptr(path, mm->scope_job)) {
free(mm->scope_job);
mm->scope_job = NULL;
- machine_save(mm);
if (mm->started) {
if (streq(result, "done"))
@@ -552,7 +551,8 @@ DBusHandlerResult bus_message_filter(
dbus_set_error(&error, BUS_ERROR_JOB_FAILED, "Start job for unit %s failed with '%s'", unit, result);
machine_send_create_reply(mm, &error);
}
- }
+ } else
+ machine_save(mm);
}
machine_add_to_gc_queue(mm);

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Aug 21 10:42:35 UTC 2013 - idonmez@suse.com
- Add patch logind_update_state_file_after_generating_the_session_fifo_not_before.patch
to fix https://bugs.freedesktop.org/show_bug.cgi?id=67273
-------------------------------------------------------------------
Tue Aug 6 09:24:07 UTC 2013 - lnussel@suse.de
- explicitly enable getty@tty1.service instead of getty@.service as
the tty1 alias has been removed from the file (bnc#833494)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Aug 1 15:52:20 UTC 2013 - fcrozat@suse.com Thu Aug 1 15:52:20 UTC 2013 - fcrozat@suse.com

View File

@ -171,6 +171,8 @@ Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch
Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch
# PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin # PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin
Patch46: use-usr-sbin-sulogin-for-emergency-service.patch Patch46: use-usr-sbin-sulogin-for-emergency-service.patch
# PATCH-FIX-UPSTREAM logind_update_state_file_after_generating_the_session_fifo_not_before.patch -- fdo#67273
Patch47: logind_update_state_file_after_generating_the_session_fifo_not_before.patch
# udev patches # udev patches
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
@ -415,6 +417,7 @@ cp %{SOURCE7} m4/
%patch40 -p1 %patch40 -p1
%patch41 -p1 %patch41 -p1
%patch46 -p1 %patch46 -p1
%patch47 -p1
# udev patches # udev patches
%patch1001 -p1 %patch1001 -p1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Aug 21 10:42:35 UTC 2013 - idonmez@suse.com
- Add patch logind_update_state_file_after_generating_the_session_fifo_not_before.patch
to fix https://bugs.freedesktop.org/show_bug.cgi?id=67273
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Aug 6 09:24:07 UTC 2013 - lnussel@suse.de Tue Aug 6 09:24:07 UTC 2013 - lnussel@suse.de

View File

@ -166,6 +166,8 @@ Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch
Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch
# PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin # PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin
Patch46: use-usr-sbin-sulogin-for-emergency-service.patch Patch46: use-usr-sbin-sulogin-for-emergency-service.patch
# PATCH-FIX-UPSTREAM logind_update_state_file_after_generating_the_session_fifo_not_before.patch -- fdo#67273
Patch47: logind_update_state_file_after_generating_the_session_fifo_not_before.patch
# udev patches # udev patches
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
@ -410,6 +412,7 @@ cp %{SOURCE7} m4/
%patch40 -p1 %patch40 -p1
%patch41 -p1 %patch41 -p1
%patch46 -p1 %patch46 -p1
%patch47 -p1
# udev patches # udev patches
%patch1001 -p1 %patch1001 -p1