tests/src/test-gobject-greeter
tests/src/test-greeter-wrapper
tests/src/test-guest-wrapper
-tests/src/test-mir-greeter
tests/src/test-qt4-greeter
tests/src/test-qt5-greeter
tests/src/test-runner
+Overview of changes in lightdm 1.11.8
+
+ * Rework logind code that gets session ID. The previous method was racy
+ and a change in lightdm 1.11.7 led to a lockup when this race occurred.
+ * Handle CanGraphical property on logind seats
+
Overview of changes in lightdm 1.11.7
* Use logind to provide the list of seats to use. Deprecate the old method
gboolean
config_load_from_standard_locations (Configuration *config, const gchar *config_path, GList **messages)
{
- gchar *config_d_dir = NULL;
- gboolean explicit_config = FALSE;
+ gchar *config_d_dir = NULL, *path;
gboolean success = TRUE;
GError *error = NULL;
+ g_return_val_if_fail (config->priv->dir == NULL, FALSE);
+
load_config_directories (g_get_system_data_dirs (), messages);
load_config_directories (g_get_system_config_dirs (), messages);
if (config_path)
{
+ path = g_strdup (config_path);
config->priv->dir = path_make_absolute (g_path_get_basename (config_path));
- explicit_config = TRUE;
}
else
{
config->priv->dir = g_strdup (CONFIG_DIR);
config_d_dir = g_build_filename (config->priv->dir, "lightdm.conf.d", NULL);
- config_path = g_build_filename (config->priv->dir, "lightdm.conf", NULL);
+ path = g_build_filename (config->priv->dir, "lightdm.conf", NULL);
}
if (config_d_dir)
load_config_directory (config_d_dir, messages);
- g_free (config_d_dir);
if (messages)
- *messages = g_list_append (*messages, g_strdup_printf ("Loading configuration from %s", config_path));
- if (!config_load_from_file (config, config_path, &error))
+ *messages = g_list_append (*messages, g_strdup_printf ("Loading configuration from %s", path));
+ if (!config_load_from_file (config, path, &error))
{
gboolean is_empty;
is_empty = error && g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT);
- if (explicit_config || !is_empty)
+ if (config_path || !is_empty)
{
if (error)
- g_printerr ("Failed to load configuration from %s: %s\n", config_path, error->message);
+ g_printerr ("Failed to load configuration from %s: %s\n", path, error->message);
success = FALSE;
}
}
g_clear_error (&error);
+ g_free (config_d_dir);
+ g_free (path);
+
return success;
}
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(lightdm, 1.11.7)
+AC_INIT(lightdm, 1.11.8)
AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz foreign])
+lightdm (1.11.8-0ubuntu1) utopic; urgency=medium
+
+ * New upstream release:
+ - Rework logind code that gets session ID. The previous method was racy
+ and a change in lightdm 1.11.7 led to a lockup when this race occurred.
+ (LP: #1364725)
+ - Handle CanGraphical property on logind seats
+
+ -- Robert Ancell <robert.ancell@canonical.com> Wed, 03 Sep 2014 17:26:36 +1200
+
lightdm (1.11.7-0ubuntu1) utopic; urgency=medium
* New upstream release:
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:07+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
"Language: sr\n"
#. Type: select
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-25 07:08+0000\n"
-"X-Generator: Launchpad (build 17163)\n"
+"X-Launchpad-Export-Date: 2014-09-03 06:08+0000\n"
+"X-Generator: Launchpad (build 17196)\n"
#. Type: select
#. Description
send_message (LightDMGreeter *greeter, guint8 *message, gsize message_length)
{
LightDMGreeterPrivate *priv = GET_PRIVATE (greeter);
- GIOStatus status;
+ gchar *data;
+ gsize data_length;
GError *error = NULL;
guint32 stated_length;
return FALSE;
}
- status = g_io_channel_write_chars (priv->to_server_channel, (gchar *) message, message_length, NULL, &error);
- if (error)
- g_warning ("Error writing to daemon: %s", error->message);
- g_clear_error (&error);
- if (status != G_IO_STATUS_NORMAL)
- return FALSE;
+ data = (gchar *) message;
+ data_length = message_length;
+ while (data_length > 0)
+ {
+ GIOStatus status;
+ gsize n_written;
+
+ status = g_io_channel_write_chars (priv->to_server_channel, data, data_length, &n_written, &error);
+ if (error)
+ g_warning ("Error writing to daemon: %s", error->message);
+ g_clear_error (&error);
+ if (status != G_IO_STATUS_NORMAL)
+ return FALSE;
+ data_length -= n_written;
+ data += n_written;
+ }
g_debug ("Wrote %zi bytes to daemon", message_length);
- g_io_channel_flush (priv->to_server_channel, NULL);
+ g_io_channel_flush (priv->to_server_channel, &error);
+ if (error)
+ g_warning ("Failed to flush data to daemon: %s", error->message);
+ g_clear_error (&error);
return TRUE;
}
static void
write_message (Greeter *greeter, guint8 *message, gsize message_length)
{
+ gchar *data;
+ gsize data_length;
GError *error = NULL;
- g_io_channel_write_chars (greeter->priv->to_greeter_channel, (gchar *) message, message_length, NULL, &error);
+ data = (gchar *) message;
+ data_length = message_length;
+ while (data_length > 0)
+ {
+ GIOStatus status;
+ gsize n_written;
+
+ status = g_io_channel_write_chars (greeter->priv->to_greeter_channel, data, data_length, &n_written, &error);
+ if (error)
+ l_warning (greeter, "Error writing to greeter: %s", error->message);
+ g_clear_error (&error);
+ if (status != G_IO_STATUS_NORMAL)
+ return;
+ data_length -= n_written;
+ data += n_written;
+ }
+
+ g_io_channel_flush (greeter->priv->to_greeter_channel, &error);
if (error)
- l_warning (greeter, "Error writing to greeter: %s", error->message);
+ l_warning (greeter, "Failed to flush data to greeter: %s", error->message);
g_clear_error (&error);
- g_io_channel_flush (greeter->priv->to_greeter_channel, NULL);
}
static void
#define LIGHTDM_BUS_NAME "org.freedesktop.DisplayManager"
+static gboolean update_login1_seat (Login1Seat *login1_seat);
+
static void
log_cb (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer data)
{
seat_stop (seat);
}
-static gboolean update_login1_seat (Login1Seat *login1_seat);
-
static void
seat_stopped_cb (Seat *seat, Login1Seat *login1_seat)
{
static void
login1_service_seat_added_cb (Login1Service *service, Login1Seat *login1_seat)
{
+ if (login1_seat_get_can_graphical (login1_seat))
+ g_debug ("Seat %s added from logind", login1_seat_get_id (login1_seat));
+ else
+ g_debug ("Seat %s added from logind without graphical output", login1_seat_get_id (login1_seat));
+
g_signal_connect (login1_seat, "can-graphical-changed", G_CALLBACK (login1_can_graphical_changed_cb), NULL);
- login1_can_graphical_changed_cb (login1_seat);
+ update_login1_seat (login1_seat);
}
static void
login1_service_seat_removed_cb (Login1Service *service, Login1Seat *login1_seat)
{
+ g_debug ("Seat %s removed from logind", login1_seat_get_id (login1_seat));
g_signal_handlers_disconnect_matched (login1_seat, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, login1_can_graphical_changed_cb, NULL);
-
- g_debug ("Seat removed from logind: %s", login1_seat_get_id (login1_seat));
remove_login1_seat (login1_seat);
}
#include "login1.h"
#define LOGIN1_SERVICE_NAME "org.freedesktop.login1"
+#define LOGIN1_OBJECT_NAME "/org/freedesktop/login1"
+#define LOGIN1_MANAGER_INTERFACE_NAME "org.freedesktop.login1.Manager"
enum {
SEAT_ADDED,
static Login1Service *singleton = NULL;
-gchar *
-login1_get_session_id (void)
-{
- GDBusConnection *bus;
- GVariant *result;
- gchar *session_path;
- GError *error = NULL;
-
- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
- if (error)
- g_warning ("Failed to get system bus: %s", error->message);
- g_clear_error (&error);
- if (!bus)
- return NULL;
- result = g_dbus_connection_call_sync (bus,
- LOGIN1_SERVICE_NAME,
- "/org/freedesktop/login1",
- "org.freedesktop.login1.Manager",
- "GetSessionByPID",
- g_variant_new ("(u)", getpid()),
- G_VARIANT_TYPE ("(o)"),
- G_DBUS_CALL_FLAGS_NONE,
- -1,
- NULL,
- &error);
- g_object_unref (bus);
-
- if (error)
- g_warning ("Failed to open login1 session: %s", error->message);
- g_clear_error (&error);
- if (!result)
- return NULL;
-
- g_variant_get (result, "(o)", &session_path);
- g_variant_unref (result);
- g_debug ("Got login1 session id: %s", session_path);
-
- return session_path;
-}
-
-void
-login1_lock_session (const gchar *session_path)
-{
- GDBusConnection *bus;
- GError *error = NULL;
-
- g_return_if_fail (session_path != NULL);
-
- g_debug ("Locking login1 session %s", session_path);
-
- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
- if (error)
- g_warning ("Failed to get system bus: %s", error->message);
- g_clear_error (&error);
- if (!bus)
- return;
-
- if (session_path)
- {
- GVariant *result;
-
- result = g_dbus_connection_call_sync (bus,
- LOGIN1_SERVICE_NAME,
- session_path,
- "org.freedesktop.login1.Session",
- "Lock",
- g_variant_new ("()"),
- G_VARIANT_TYPE ("()"),
- G_DBUS_CALL_FLAGS_NONE,
- -1,
- NULL,
- &error);
- if (error)
- g_warning ("Error locking login1 session: %s", error->message);
- g_clear_error (&error);
- if (result)
- g_variant_unref (result);
- }
- g_object_unref (bus);
-}
-
-void
-login1_unlock_session (const gchar *session_path)
-{
- GDBusConnection *bus;
- GError *error = NULL;
-
- g_return_if_fail (session_path != NULL);
-
- g_debug ("Unlocking login1 session %s", session_path);
-
- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
- if (error)
- g_warning ("Failed to get system bus: %s", error->message);
- g_clear_error (&error);
- if (!bus)
- return;
-
- if (session_path)
- {
- GVariant *result;
-
- result = g_dbus_connection_call_sync (bus,
- LOGIN1_SERVICE_NAME,
- session_path,
- "org.freedesktop.login1.Session",
- "Unlock",
- g_variant_new ("()"),
- G_VARIANT_TYPE ("()"),
- G_DBUS_CALL_FLAGS_NONE,
- -1,
- NULL,
- &error);
- if (error)
- g_warning ("Error unlocking login1 session: %s", error->message);
- g_clear_error (&error);
- if (result)
- g_variant_unref (result);
- }
- g_object_unref (bus);
-}
-
-void
-login1_activate_session (const gchar *session_path)
-{
- GDBusConnection *bus;
- GError *error = NULL;
-
- g_return_if_fail (session_path != NULL);
-
- g_debug ("Activating login1 session %s", session_path);
-
- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
- if (error)
- g_warning ("Failed to get system bus: %s", error->message);
- g_clear_error (&error);
- if (!bus)
- return;
-
- if (session_path)
- {
- GVariant *result;
-
- result = g_dbus_connection_call_sync (bus,
- LOGIN1_SERVICE_NAME,
- session_path,
- "org.freedesktop.login1.Session",
- "Activate",
- g_variant_new ("()"),
- G_VARIANT_TYPE ("()"),
- G_DBUS_CALL_FLAGS_NONE,
- -1,
- NULL,
- &error);
- if (error)
- g_warning ("Error activating login1 session: %s", error->message);
- g_clear_error (&error);
- if (result)
- g_variant_unref (result);
- }
- g_object_unref (bus);
-}
-
Login1Service *
login1_service_get_instance (void)
{
service->priv->signal_id = g_dbus_connection_signal_subscribe (service->priv->connection,
LOGIN1_SERVICE_NAME,
- "org.freedesktop.login1.Manager",
+ LOGIN1_MANAGER_INTERFACE_NAME,
NULL,
- "/org/freedesktop/login1",
+ LOGIN1_OBJECT_NAME,
NULL,
G_DBUS_SIGNAL_FLAGS_NONE,
signal_cb,
result = g_dbus_connection_call_sync (service->priv->connection,
LOGIN1_SERVICE_NAME,
- "/org/freedesktop/login1",
- "org.freedesktop.login1.Manager",
+ LOGIN1_OBJECT_NAME,
+ LOGIN1_MANAGER_INTERFACE_NAME,
"ListSeats",
g_variant_new ("()"),
G_VARIANT_TYPE ("(a(so))"),
return NULL;
}
+void
+login1_service_lock_session (Login1Service *service, const gchar *session_id)
+{
+ GError *error = NULL;
+
+ g_return_if_fail (service != NULL);
+ g_return_if_fail (session_id != NULL);
+
+ g_debug ("Locking login1 session %s", session_id);
+
+ if (session_id)
+ {
+ GVariant *result;
+
+ result = g_dbus_connection_call_sync (service->priv->connection,
+ LOGIN1_SERVICE_NAME,
+ LOGIN1_OBJECT_NAME,
+ LOGIN1_MANAGER_INTERFACE_NAME,
+ "LockSession",
+ g_variant_new ("(s)", session_id),
+ G_VARIANT_TYPE ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ &error);
+ if (error)
+ g_warning ("Error locking login1 session: %s", error->message);
+ g_clear_error (&error);
+ if (result)
+ g_variant_unref (result);
+ }
+}
+
+void
+login1_service_unlock_session (Login1Service *service, const gchar *session_id)
+{
+ GError *error = NULL;
+
+ g_return_if_fail (service != NULL);
+ g_return_if_fail (session_id != NULL);
+
+ g_debug ("Unlocking login1 session %s", session_id);
+
+ if (session_id)
+ {
+ GVariant *result;
+
+ result = g_dbus_connection_call_sync (service->priv->connection,
+ LOGIN1_SERVICE_NAME,
+ LOGIN1_OBJECT_NAME,
+ LOGIN1_MANAGER_INTERFACE_NAME,
+ "UnlockSession",
+ g_variant_new ("(s)", session_id),
+ G_VARIANT_TYPE ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ &error);
+ if (error)
+ g_warning ("Error unlocking login1 session: %s", error->message);
+ g_clear_error (&error);
+ if (result)
+ g_variant_unref (result);
+ }
+}
+
+void
+login1_service_activate_session (Login1Service *service, const gchar *session_id)
+{
+ GError *error = NULL;
+
+ g_return_if_fail (service != NULL);
+ g_return_if_fail (session_id != NULL);
+
+ g_debug ("Activating login1 session %s", session_id);
+
+ if (session_id)
+ {
+ GVariant *result;
+
+ result = g_dbus_connection_call_sync (service->priv->connection,
+ LOGIN1_SERVICE_NAME,
+ LOGIN1_OBJECT_NAME,
+ LOGIN1_MANAGER_INTERFACE_NAME,
+ "ActivateSession",
+ g_variant_new ("(s)", session_id),
+ G_VARIANT_TYPE ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ &error);
+ if (error)
+ g_warning ("Error activating login1 session: %s", error->message);
+ g_clear_error (&error);
+ if (result)
+ g_variant_unref (result);
+ }
+}
+
static void
login1_service_init (Login1Service *service)
{
G_BEGIN_DECLS
-gchar *login1_get_session_id (void);
-
-void login1_lock_session (const gchar *session_path);
-
-void login1_unlock_session (const gchar *session_path);
-
-void login1_activate_session (const gchar *session_path);
-
#define LOGIN1_SEAT_TYPE (login1_seat_get_type())
#define LOGIN1_SEAT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LOGIN1_SEAT_TYPE, Login1Seat));
Login1Seat *login1_service_get_seat (Login1Service *service, const gchar *id);
+void login1_service_lock_session (Login1Service *service, const gchar *session_id);
+
+void login1_service_unlock_session (Login1Service *service, const gchar *session_id);
+
+void login1_service_activate_session (Login1Service *service, const gchar *session_id);
+
const gchar *login1_seat_get_id (Login1Seat *seat);
gboolean login1_seat_get_can_graphical (Login1Seat *seat);
gchar **argv;
gchar **env_keys, **env_values;
guint i, env_length;
- GList *link;
+ GList *keys, *link;
pid_t pid;
int log_fd = -1;
GError *error = NULL;
env_length = g_hash_table_size (process->priv->env);
env_keys = g_malloc (sizeof (gchar *) * env_length);
env_values = g_malloc (sizeof (gchar *) * env_length);
- for (i = 0, link = g_hash_table_get_keys (process->priv->env); i < env_length; i++, link = link->next)
+ keys = g_hash_table_get_keys (process->priv->env);
+ for (i = 0, link = keys; i < env_length; i++, link = link->next)
{
env_keys[i] = link->data;
env_values[i] = g_hash_table_lookup (process->priv->env, env_keys[i]);
}
+ g_list_free (keys);
pid = fork ();
if (pid == 0)
XAuthority *x_authority = NULL;
gchar *x_authority_filename;
GDBusConnection *bus;
+ const gchar *login1_session = NULL;
gchar *console_kit_cookie = NULL;
- gchar *login1_session = NULL;
const gchar *locale_value;
gchar *locale_var;
static const gchar * const locale_var_names[] = {
}
/* Check what logind session we are, or fallback to ConsoleKit */
- login1_session = login1_get_session_id ();
+ login1_session = pam_getenv (pam_handle, "XDG_SESSION_ID");
if (login1_session)
+ {
write_string (login1_session);
+ if (version >= 2)
+ write_string (NULL);
+ }
else
{
g_variant_builder_init (&ck_parameters, G_VARIANT_TYPE ("(a(sv))"));
else
g_variant_builder_add (&ck_parameters, "(sv)", "is-local", g_variant_new_boolean (TRUE));
console_kit_cookie = ck_open_session (&ck_parameters);
+ if (version >= 2)
+ write_string (NULL);
write_string (console_kit_cookie);
if (console_kit_cookie)
{
close (from_child_input);
/* Indicate what version of the protocol we are using */
- version = 1;
+ version = 2;
write_data (session, &version, sizeof (version));
/* Send configuration */
for (i = 0; i < argc; i++)
write_string (session, session->priv->argv[i]);
- if (login1_service_get_is_connected (login1_service_get_instance ()))
- session->priv->login1_session = read_string_from_child (session);
- if (!session->priv->login1_session)
- session->priv->console_kit_cookie = read_string_from_child (session);
+ session->priv->login1_session = read_string_from_child (session);
+ session->priv->console_kit_cookie = read_string_from_child (session);
}
void
if (getuid () == 0)
{
if (session->priv->login1_session)
- login1_lock_session (session->priv->login1_session);
+ login1_service_lock_session (login1_service_get_instance (), session->priv->login1_session);
else if (session->priv->console_kit_cookie)
ck_lock_session (session->priv->console_kit_cookie);
}
if (getuid () == 0)
{
if (session->priv->login1_session)
- login1_unlock_session (session->priv->login1_session);
+ login1_service_unlock_session (login1_service_get_instance (), session->priv->login1_session);
else if (session->priv->console_kit_cookie)
ck_unlock_session (session->priv->console_kit_cookie);
}
if (getuid () == 0)
{
if (session->priv->login1_session)
- login1_activate_session (session->priv->login1_session);
+ login1_service_activate_session (login1_service_get_instance (), session->priv->login1_session);
else if (session->priv->console_kit_cookie)
ck_activate_session (session->priv->console_kit_cookie);
}
errno = 0;
if (write (compositor->priv->to_compositor_pipe[1], data, data_length) != data_length)
l_warning (compositor, "Failed to write to compositor: %s", strerror (errno));
+
+ g_free (data);
}
void
test-open-file-descriptors \
test-xdmcp-server-open-file-descriptors \
test-multi-seat \
+ test-multi-seat-seat0-non-graphical \
test-multi-seat-non-graphical \
test-multi-seat-change-graphical \
test-mir-autologin \
scripts/mir-session-compositor-crash.conf \
scripts/mir-session-crash.conf \
scripts/multi-seat.conf \
- scripts/multi-seat-non-graphical.conf \
scripts/multi-seat-change-graphical.conf \
+ scripts/multi-seat-non-graphical.conf \
+ scripts/multi-seat-seat0-non-graphical.conf \
scripts/no-accounts-service.conf \
scripts/no-config.conf \
scripts/no-console-kit.conf \
--- /dev/null
+#
+# Check seat0 is started only once it becomes graphical
+#
+
+[test-runner-config]
+seat0-can-graphical=false
+
+#?*START-DAEMON
+#?RUNNER DAEMON-START
+
+# Check no seat is added
+#?*WAIT
+
+# Go graphical
+#?*UPDATE-SEAT ID=seat0 CAN-GRAPHICAL=TRUE
+
+# seat0 starts
+#?XSERVER-0 START VT=7 SEAT=seat0
+#?*XSERVER-0 INDICATE-READY
+#?XSERVER-0 INDICATE-READY
+#?XSERVER-0 ACCEPT-CONNECT
+#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
+#?LOGIN1 ACTIVATE-SESSION SESSION=c0
+#?XSERVER-0 ACCEPT-CONNECT
+#?GREETER-X-0 CONNECT-XSERVER
+#?GREETER-X-0 CONNECT-TO-DAEMON
+#?GREETER-X-0 CONNECTED-TO-DAEMON
+
+# Cleanup
+#?*STOP-DAEMON
+#?GREETER-X-0 TERMINATE SIGNAL=15
+#?XSERVER-0 TERMINATE SIGNAL=15
+#?RUNNER DAEMON-EXIT STATUS=0
test-gobject-greeter \
test-greeter-wrapper \
test-guest-wrapper \
- test-mir-greeter \
test-runner \
test-script-hook \
test-session \
$(GIO_UNIX_LIBS) \
$(XCB_LIBS)
-test_mir_greeter_SOURCES = test-mir-greeter.c status.c status.h
-test_mir_greeter_CFLAGS = \
- -I$(top_srcdir)/liblightdm-gobject \
- $(WARN_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(GIO_UNIX_CFLAGS)
-test_mir_greeter_LDADD = \
- -L$(top_builddir)/liblightdm-gobject \
- -llightdm-gobject-1 \
- $(GLIB_LIBS) \
- $(GIO_UNIX_LIBS)
-
guest_account_SOURCES = guest-account.c status.c status.h
guest_account_CFLAGS = \
$(WARN_CFLAGS) \
int
pam_open_session (pam_handle_t *pamh, int flags)
{
+ GVariant *result;
+ GError *error = NULL;
+
if (pamh == NULL)
return PAM_SYSTEM_ERR;
g_mkdir_with_parents (entry->pw_dir, 0755);
}
+ /* Open logind session */
+ result = g_dbus_connection_call_sync (g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL),
+ "org.freedesktop.login1",
+ "/org/freedesktop/login1",
+ "org.freedesktop.login1.Manager",
+ "CreateSession",
+ g_variant_new ("()", ""),
+ G_VARIANT_TYPE ("(so)"),
+ G_DBUS_CALL_FLAGS_NONE,
+ G_MAXINT,
+ NULL,
+ &error);
+ if (result)
+ {
+ gchar *e;
+ const gchar *id;
+
+ g_variant_get (result, "(&so)", &id, NULL);
+ e = g_strdup_printf ("XDG_SESSION_ID=%s", id);
+ pam_putenv (pamh, e);
+ g_free (e);
+ g_variant_unref (result);
+ }
+ else
+ g_printerr ("Failed to create logind session: %s\n", error->message);
+ g_clear_error (&error);
+
return PAM_SUCCESS;
}
int
main (int argc, char **argv)
{
- gchar *display, *xdg_seat, *xdg_vtnr, *xdg_session_cookie, *xdg_session_class, *mir_socket, *mir_vt, *mir_id;
+ gchar *display, *xdg_seat, *xdg_vtnr, *xdg_session_cookie, *xdg_session_class, *mir_socket, *mir_vt, *mir_id, *path;
GString *status_text;
#if !defined(GLIB_VERSION_2_36)
g_string_free (status_text, TRUE);
config = g_key_file_new ();
- g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);
+ path = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL);
+ g_key_file_load_from_file (config, path, G_KEY_FILE_NONE, NULL);
+ g_free (path);
if (g_key_file_has_key (config, "test-greeter-config", "return-value", NULL))
{
+++ /dev/null
-/* -*- Mode: C; indent-tabs-mode: nil; tab-width: 4 -*- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <lightdm.h>
-
-#include "status.h"
-
-static gchar *greeter_id;
-static GMainLoop *loop;
-static LightDMGreeter *greeter;
-static GKeyFile *config;
-
-static void
-show_message_cb (LightDMGreeter *greeter, const gchar *text, LightDMMessageType type)
-{
- status_notify ("%s SHOW-MESSAGE TEXT=\"%s\"", greeter_id, text);
-}
-
-static void
-show_prompt_cb (LightDMGreeter *greeter, const gchar *text, LightDMPromptType type)
-{
- status_notify ("%s SHOW-PROMPT TEXT=\"%s\"", greeter_id, text);
-}
-
-static void
-authentication_complete_cb (LightDMGreeter *greeter)
-{
- if (lightdm_greeter_get_authentication_user (greeter))
- status_notify ("%s AUTHENTICATION-COMPLETE USERNAME=%s AUTHENTICATED=%s",
- greeter_id,
- lightdm_greeter_get_authentication_user (greeter),
- lightdm_greeter_get_is_authenticated (greeter) ? "TRUE" : "FALSE");
- else
- status_notify ("%s AUTHENTICATION-COMPLETE AUTHENTICATED=%s",
- greeter_id,
- lightdm_greeter_get_is_authenticated (greeter) ? "TRUE" : "FALSE");
-}
-
-static void
-signal_cb (int signum)
-{
- status_notify ("%s TERMINATE SIGNAL=%d", greeter_id, signum);
- exit (EXIT_SUCCESS);
-}
-
-static void
-request_cb (const gchar *name, GHashTable *params)
-{
- if (!name)
- {
- g_main_loop_quit (loop);
- return;
- }
-
- if (strcmp (name, "AUTHENTICATE") == 0)
- lightdm_greeter_authenticate (greeter, g_hash_table_lookup (params, "USERNAME"));
-
- if (strcmp (name, "RESPOND") == 0)
- {
- gchar *text = g_strdup (g_hash_table_lookup (params, "TEXT"));
- text[strlen (text) - 1] = '\0';
- lightdm_greeter_respond (greeter, text);
- g_free (text);
- }
-
- if (strcmp (name, "CANCEL-AUTHENTICATION") == 0)
- lightdm_greeter_cancel_authentication (greeter);
-
- if (strcmp (name, "START-SESSION") == 0)
- {
- if (!lightdm_greeter_start_session_sync (greeter, g_hash_table_lookup (params, "SESSION"), NULL))
- status_notify ("%s SESSION-FAILED", greeter_id);
- }
-}
-
-int
-main (int argc, char **argv)
-{
- signal (SIGINT, signal_cb);
- signal (SIGTERM, signal_cb);
-
-#if !defined(GLIB_VERSION_2_36)
- g_type_init ();
-#endif
-
- greeter_id = g_strdup ("GREETER-MIR");
-
- loop = g_main_loop_new (NULL, FALSE);
-
- status_connect (request_cb, greeter_id);
-
- status_notify ("%s START", greeter_id);
-
- config = g_key_file_new ();
- g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);
-
- if (g_key_file_has_key (config, "test-greeter-config", "return-value", NULL))
- {
- int return_value = g_key_file_get_integer (config, "test-greeter-config", "return-value", NULL);
- status_notify ("%s EXIT CODE=%d", greeter_id, return_value);
- return return_value;
- }
-
- greeter = lightdm_greeter_new ();
- g_signal_connect (greeter, "show-message", G_CALLBACK (show_message_cb), NULL);
- g_signal_connect (greeter, "show-prompt", G_CALLBACK (show_prompt_cb), NULL);
- g_signal_connect (greeter, "authentication-complete", G_CALLBACK (authentication_complete_cb), NULL);
-
- status_notify ("%s CONNECT-TO-DAEMON", greeter_id);
- if (!lightdm_greeter_connect_to_daemon_sync (greeter, NULL))
- {
- status_notify ("%s FAIL-CONNECT-DAEMON", greeter_id);
- return EXIT_FAILURE;
- }
-
- status_notify ("%s CONNECTED-TO-DAEMON", greeter_id);
-
- g_main_loop_run (loop);
-
- return EXIT_SUCCESS;
-}
typedef struct
{
+ gchar *id;
gchar *path;
guint pid;
gboolean locked;
GDBusMethodInvocation *invocation,
gpointer user_data)
{
- Login1Session *session = user_data;
-
- if (strcmp (method_name, "Lock") == 0)
- {
- if (!session->locked)
- {
- gchar *status = g_strdup_printf ("LOGIN1 LOCK-SESSION SESSION=%s", strrchr (object_path, '/') + 1);
- check_status (status);
- g_free (status);
- }
- session->locked = TRUE;
- g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
- }
- else if (strcmp (method_name, "Unlock") == 0)
- {
- if (session->locked)
- {
- gchar *status = g_strdup_printf ("LOGIN1 UNLOCK-SESSION SESSION=%s", strrchr (object_path, '/') + 1);
- check_status (status);
- g_free (status);
- }
- session->locked = FALSE;
- g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
- }
- else if (strcmp (method_name, "Activate") == 0)
- {
- gchar *status = g_strdup_printf ("LOGIN1 ACTIVATE-SESSION SESSION=%s", strrchr (object_path, '/') + 1);
- check_status (status);
- g_free (status);
-
- g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
- }
- else
- g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "No such method: %s", method_name);
+ /*Login1Session *session = user_data;*/
+ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "No such method: %s", method_name);
}
static Login1Session *
-open_login1_session (GDBusConnection *connection,
- GVariant *params)
+create_login1_session (GDBusConnection *connection)
{
Login1Session *session;
GError *error = NULL;
const gchar *login1_session_interface =
"<node>"
" <interface name='org.freedesktop.login1.Session'>"
- " <method name='Lock'/>"
- " <method name='Unlock'/>"
- " <method name='Activate'/>"
" </interface>"
"</node>";
static const GDBusInterfaceVTable login1_session_vtable =
session = g_malloc0 (sizeof (Login1Session));
login1_sessions = g_list_append (login1_sessions, session);
- session->path = g_strdup_printf ("/org/freedesktop/login1/Session/c%d", login1_session_index++);
+ session->id = g_strdup_printf ("c%d", login1_session_index++);
+ session->path = g_strdup_printf ("/org/freedesktop/login1/Session/%s", session->id);
login1_session_info = g_dbus_node_info_new_for_xml (login1_session_interface, &error);
if (error)
return session;
}
+static Login1Session *
+find_login1_session (const gchar *id)
+{
+ GList *link;
+
+ for (link = login1_sessions; link; link = link->next)
+ {
+ Login1Session *session = link->data;
+ if (strcmp (session->id, id) == 0)
+ return session;
+ }
+
+ return NULL;
+}
+
static void
handle_login1_call (GDBusConnection *connection,
const gchar *sender,
}
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(a(so))", &seats));
}
- else if (strcmp (method_name, "GetSessionByPID") == 0)
+ else if (strcmp (method_name, "CreateSession") == 0)
{
- /* Look for a session with our PID, and create one if we don't have one already. */
- GList *link;
- guint pid;
- Login1Session *ret = NULL;
+ /* Note: this is not the full CreateSession as used by logind, we just
+ need one so our fake PAM stack can communicate with this service */
+ Login1Session *session = create_login1_session (connection);
+ g_dbus_method_invocation_return_value (invocation, g_variant_new ("(so)", session->id, session->path));
- g_variant_get (parameters, "(u)", &pid);
+ }
+ else if (strcmp (method_name, "LockSession") == 0)
+ {
+ const gchar *id;
+ Login1Session *session;
- for (link = login1_sessions; link; link = link->next)
+ g_variant_get (parameters, "(&s)", &id);
+ session = find_login1_session (id);
+ if (!session)
{
- Login1Session *session;
- session = link->data;
- if (session->pid == pid)
- {
- ret = session;
- break;
- }
+ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "No such session: %s", id);
+ return;
+ }
+
+ if (!session->locked)
+ {
+ gchar *status = g_strdup_printf ("LOGIN1 LOCK-SESSION SESSION=%s", id);
+ check_status (status);
+ g_free (status);
+ }
+ session->locked = TRUE;
+ g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
+ }
+ else if (strcmp (method_name, "UnlockSession") == 0)
+ {
+ const gchar *id;
+ Login1Session *session;
+
+ g_variant_get (parameters, "(&s)", &id);
+ session = find_login1_session (id);
+ if (!session)
+ {
+ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "No such session: %s", id);
+ return;
+ }
+
+ if (session->locked)
+ {
+ gchar *status = g_strdup_printf ("LOGIN1 UNLOCK-SESSION SESSION=%s", id);
+ check_status (status);
+ g_free (status);
+ }
+ session->locked = FALSE;
+ g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
+ }
+ else if (strcmp (method_name, "ActivateSession") == 0)
+ {
+ const gchar *id;
+ Login1Session *session;
+
+ g_variant_get (parameters, "(&s)", &id);
+ session = find_login1_session (id);
+ if (!session)
+ {
+ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "No such session: %s", id);
+ return;
}
- /* Not found */
- if (!ret)
- ret = open_login1_session (connection, parameters);
- g_dbus_method_invocation_return_value (invocation,
- g_variant_new("(o)", ret->path));
+ gchar *status = g_strdup_printf ("LOGIN1 ACTIVATE-SESSION SESSION=%s", id);
+ check_status (status);
+ g_free (status);
+ g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
}
else if (strcmp (method_name, "CanReboot") == 0)
{
" <method name='ListSeats'>"
" <arg name='seats' type='a(so)' direction='out'/>"
" </method>"
- " <method name='GetSessionByPID'>"
- " <arg name='pid' type='u' direction='in'/>"
- " <arg name='session' type='o' direction='out'/>"
+ " <method name='CreateSession'>"
+ " <arg name='id' type='s' direction='out'/>"
+ " <arg name='path' type='o' direction='out'/>"
+ " </method>"
+ " <method name='LockSession'>"
+ " <arg name='id' type='s' direction='in'/>"
+ " </method>"
+ " <method name='UnlockSession'>"
+ " <arg name='id' type='s' direction='in'/>"
+ " </method>"
+ " <method name='ActivateSession'>"
+ " <arg name='id' type='s' direction='in'/>"
" </method>"
" <method name='CanReboot'>"
" <arg name='result' direction='out' type='s'/>"
handle_login1_call,
};
GDBusNodeInfo *login1_info;
+ Login1Seat *seat0;
GError *error = NULL;
login1_info = g_dbus_node_info_new_for_xml (login1_interface, &error);
g_dbus_node_info_unref (login1_info);
/* We always have seat0 */
- add_login1_seat (connection, "seat0", FALSE);
+ seat0 = add_login1_seat (connection, "seat0", FALSE);
+ if (g_key_file_has_key (config, "test-runner-config", "seat0-can-graphical", NULL))
+ seat0->can_graphical = g_key_file_get_boolean (config, "test-runner-config", "seat0-can-graphical", NULL);
+ if (g_key_file_has_key (config, "test-runner-config", "seat0-can-multi-session", NULL))
+ seat0->can_multi_session = g_key_file_get_boolean (config, "test-runner-config", "seat0-can-multi-session", NULL);
service_count--;
if (service_count == 0)
--- /dev/null
+#!/bin/sh
+./src/dbus-env ./src/test-runner multi-seat-seat0-non-graphical test-gobject-greeter