From ea7193b94db9b2ef7205353000f95b4629107871 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 2 May 2022 11:08:37 +1200 Subject: [PATCH 01/29] Fix test build failing on older versions of glibc without __getgroups_chk --- configure.ac | 2 +- tests/src/libsystem.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 02df03673..b386ab632 100644 --- a/configure.ac +++ b/configure.ac @@ -48,7 +48,7 @@ AC_CHECK_HEADERS(security/pam_appl.h, [], AC_MSG_ERROR(PAM not found)) AC_CHECK_HEADERS(gcrypt.h, [], AC_MSG_ERROR(libgcrypt not found)) -AC_CHECK_FUNCS(setresgid setresuid clearenv) +AC_CHECK_FUNCS(setresgid setresuid clearenv __getgroups_chk) PKG_CHECK_MODULES(LIGHTDM, [ glib-2.0 >= 2.44 diff --git a/tests/src/libsystem.c b/tests/src/libsystem.c index c593dbf4f..ab4b41a1e 100644 --- a/tests/src/libsystem.c +++ b/tests/src/libsystem.c @@ -127,11 +127,13 @@ getgroups (int size, gid_t list[]) return groups_length; } +#if HAVE___GETGROUPS_CHK int __getgroups_chk (int size, gid_t list[], size_t listlen) { return getgroups (size, list); } +#endif int setgroups (size_t size, const gid_t *list) From 7c0d356ab196c9a1f40d52dbb611900e37c52b88 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 2 May 2022 11:19:51 +1200 Subject: [PATCH 02/29] Fix check for __getgroups_chk --- tests/src/libsystem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/libsystem.c b/tests/src/libsystem.c index ab4b41a1e..687f1fdd6 100644 --- a/tests/src/libsystem.c +++ b/tests/src/libsystem.c @@ -127,7 +127,7 @@ getgroups (int size, gid_t list[]) return groups_length; } -#if HAVE___GETGROUPS_CHK +#ifdef HAVE___GETGROUPS_CHK int __getgroups_chk (int size, gid_t list[], size_t listlen) { From 6f40639f4d735333c05fe076704ad2b3e95923c7 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 2 May 2022 11:25:43 +1200 Subject: [PATCH 03/29] Add __getgroups_chk prototype to fix build failures on some systems --- tests/src/libsystem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/src/libsystem.c b/tests/src/libsystem.c index 687f1fdd6..81d367d95 100644 --- a/tests/src/libsystem.c +++ b/tests/src/libsystem.c @@ -128,6 +128,7 @@ getgroups (int size, gid_t list[]) } #ifdef HAVE___GETGROUPS_CHK +int __getgroups_chk (int size, gid_t list[], size_t listlen); int __getgroups_chk (int size, gid_t list[], size_t listlen) { From ae4b2901ae7872b3e90a8866165289419dd05672 Mon Sep 17 00:00:00 2001 From: Paul Wolneykien Date: Sat, 30 Apr 2022 01:18:02 +0300 Subject: [PATCH 04/29] test-runner.c: Fix: Make the test runner aware of the --with-greeter-session configuration parameter Use DEFAULT_GREETER_SESSION for the greeter session name. Without this modification LightDM built with non-default greeter session name is unable to pass some tests. Signed-off-by: Paul Wolneykien --- tests/src/test-runner.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/src/test-runner.c b/tests/src/test-runner.c index 99af1c7d4..78f476afb 100644 --- a/tests/src/test-runner.c +++ b/tests/src/test-runner.c @@ -11,6 +11,8 @@ #include #include +#include "../../config.h" + /* Timeout in ms waiting for the status we expect */ static int status_timeout_ms = 4000; @@ -2557,7 +2559,8 @@ main (int argc, char **argv) perror ("Failed to copy greeters"); /* Set up the default greeter */ - g_autofree gchar *greeter_path = g_build_filename (temp_dir, "usr", "share", "lightdm", "greeters", "default.desktop", NULL); + g_autofree gchar *greeter_session = g_strdup_printf ("%s.desktop", DEFAULT_GREETER_SESSION); + g_autofree gchar *greeter_path = g_build_filename (temp_dir, "usr", "share", "lightdm", "greeters", greeter_session, NULL); g_autofree gchar *greeter = g_strdup_printf ("%s.desktop", argv[2]); if (symlink (greeter, greeter_path) < 0) { From 9abb4baec7b740476401456ec961acd036afdd23 Mon Sep 17 00:00:00 2001 From: Paul Wolneykien Date: Wed, 4 May 2022 16:38:43 +0300 Subject: [PATCH 05/29] test-runner.c: Fix: Make the test runner aware of the --with-greeter-user configuration parameter Use GREETER_USER for the greeter user name in the `/etc/passwd` file. Without this modification LightDM built with non-default greeter user name is unable to pass some tests. Signed-off-by: Paul Wolneykien --- tests/src/test-runner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/test-runner.c b/tests/src/test-runner.c index 78f476afb..1b961961f 100644 --- a/tests/src/test-runner.c +++ b/tests/src/test-runner.c @@ -2582,7 +2582,7 @@ main (int argc, char **argv) /* Root account */ {"root", "", "root", 0}, /* Unprivileged account for greeters */ - {"lightdm", "", "", 100}, + {GREETER_USER, "", "", 100}, /* These accounts have a password */ {"have-password1", "password", "Password User 1", 1000}, {"have-password2", "password", "Password User 2", 1001}, From cc0160667e8a3b132236a7bf5776c3865c481b7b Mon Sep 17 00:00:00 2001 From: Paul Wolneykien Date: Wed, 4 May 2022 16:56:42 +0300 Subject: [PATCH 06/29] test-runner.c: Fix: Make the test configuration files aware of the --with-greeter-user configuration parameter Use GREETER_USER for the greeter user name in the `tests/scripts/*-pam*.conf.in` files. Without this modification LightDM built with non-default greeter user name is unable to pass some tests. Signed-off-by: Paul Wolneykien --- configure.ac | 3 +++ ...ogin-pam-config.conf => login-pam-config.conf.in} | 12 ++++++------ tests/scripts/{login-pam.conf => login-pam.conf.in} | 12 ++++++------ ... => switch-to-greeter-return-session-pam.conf.in} | 12 ++++++------ 4 files changed, 21 insertions(+), 18 deletions(-) rename tests/scripts/{login-pam-config.conf => login-pam-config.conf.in} (87%) rename tests/scripts/{login-pam.conf => login-pam.conf.in} (86%) rename tests/scripts/{switch-to-greeter-return-session-pam.conf => switch-to-greeter-return-session-pam.conf.in} (90%) diff --git a/configure.ac b/configure.ac index b386ab632..7e2b4eeb5 100644 --- a/configure.ac +++ b/configure.ac @@ -216,6 +216,9 @@ po/Makefile.in src/Makefile tests/Makefile tests/src/Makefile +tests/scripts/login-pam-config.conf +tests/scripts/login-pam.conf +tests/scripts/switch-to-greeter-return-session-pam.conf ]) AC_OUTPUT diff --git a/tests/scripts/login-pam-config.conf b/tests/scripts/login-pam-config.conf.in similarity index 87% rename from tests/scripts/login-pam-config.conf rename to tests/scripts/login-pam-config.conf.in index 48199767c..fc85031c4 100644 --- a/tests/scripts/login-pam-config.conf +++ b/tests/scripts/login-pam-config.conf.in @@ -22,9 +22,9 @@ log-events=true #?XSERVER-0 ACCEPT-CONNECT # Create PAM session for greeter -#?PAM-lightdm START SERVICE=lightdm-greeter-alternative USER=lightdm -#?PAM-lightdm SETCRED ESTABLISH_CRED -#?PAM-lightdm OPEN-SESSION +#?PAM-@GREETER_USER@ START SERVICE=lightdm-greeter-alternative USER=@GREETER_USER@ +#?PAM-@GREETER_USER@ SETCRED ESTABLISH_CRED +#?PAM-@GREETER_USER@ OPEN-SESSION # Greeter starts #?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter @@ -50,9 +50,9 @@ log-events=true # Greeter session stops #?GREETER-X-0 TERMINATE SIGNAL=15 -#?PAM-lightdm CLOSE-SESSION -#?PAM-lightdm SETCRED DELETE_CRED -#?PAM-lightdm END +#?PAM-@GREETER_USER@ CLOSE-SESSION +#?PAM-@GREETER_USER@ SETCRED DELETE_CRED +#?PAM-@GREETER_USER@ END # Session starts #?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password1 diff --git a/tests/scripts/login-pam.conf b/tests/scripts/login-pam.conf.in similarity index 86% rename from tests/scripts/login-pam.conf rename to tests/scripts/login-pam.conf.in index c9d51f55f..36840790a 100644 --- a/tests/scripts/login-pam.conf +++ b/tests/scripts/login-pam.conf.in @@ -20,9 +20,9 @@ log-events=true #?XSERVER-0 ACCEPT-CONNECT # Create PAM session for greeter -#?PAM-lightdm START SERVICE=lightdm-greeter USER=lightdm -#?PAM-lightdm SETCRED ESTABLISH_CRED -#?PAM-lightdm OPEN-SESSION +#?PAM-@GREETER_USER@ START SERVICE=lightdm-greeter USER=@GREETER_USER@ +#?PAM-@GREETER_USER@ SETCRED ESTABLISH_CRED +#?PAM-@GREETER_USER@ OPEN-SESSION # Greeter starts #?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter @@ -48,9 +48,9 @@ log-events=true # Greeter session stops #?GREETER-X-0 TERMINATE SIGNAL=15 -#?PAM-lightdm CLOSE-SESSION -#?PAM-lightdm SETCRED DELETE_CRED -#?PAM-lightdm END +#?PAM-@GREETER_USER@ CLOSE-SESSION +#?PAM-@GREETER_USER@ SETCRED DELETE_CRED +#?PAM-@GREETER_USER@ END # Session starts #?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password1 diff --git a/tests/scripts/switch-to-greeter-return-session-pam.conf b/tests/scripts/switch-to-greeter-return-session-pam.conf.in similarity index 90% rename from tests/scripts/switch-to-greeter-return-session-pam.conf rename to tests/scripts/switch-to-greeter-return-session-pam.conf.in index 7e79e57f2..79de43445 100644 --- a/tests/scripts/switch-to-greeter-return-session-pam.conf +++ b/tests/scripts/switch-to-greeter-return-session-pam.conf.in @@ -49,9 +49,9 @@ log-events=true #?LOGIN1 LOCK-SESSION SESSION=c0 # Create PAM session for greeter -#?PAM-lightdm START SERVICE=lightdm-greeter USER=lightdm -#?PAM-lightdm SETCRED ESTABLISH_CRED -#?PAM-lightdm OPEN-SESSION +#?PAM-@GREETER_USER@ START SERVICE=lightdm-greeter USER=@GREETER_USER@ +#?PAM-@GREETER_USER@ SETCRED ESTABLISH_CRED +#?PAM-@GREETER_USER@ OPEN-SESSION # Greeter starts #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter @@ -87,9 +87,9 @@ log-events=true # Greeter and X server stop #?GREETER-X-1 TERMINATE SIGNAL=15 -#?PAM-lightdm CLOSE-SESSION -#?PAM-lightdm SETCRED DELETE_CRED -#?PAM-lightdm END +#?PAM-@GREETER_USER@ CLOSE-SESSION +#?PAM-@GREETER_USER@ SETCRED DELETE_CRED +#?PAM-@GREETER_USER@ END #?XSERVER-1 TERMINATE SIGNAL=15 # Cleanup From 224b090ed78abbf43ca75f825dba78966c97c082 Mon Sep 17 00:00:00 2001 From: Paul Wolneykien Date: Fri, 6 May 2022 14:55:54 +0300 Subject: [PATCH 07/29] Disable compiler optimizations for test programs Disable compiler optimizations for test programs as it is known to be buggy with `LD_PRELOAD`. In particular, `getgroups()` call in `request_cb()` callback of `test-session` isn't overloaded by the corresponding function of the test library `libsystem.so` via `LD_PRELOAD` resulting in `test-group-membership` failure. Signed-off-by: Paul Wolneykien --- tests/src/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/src/Makefile.am b/tests/src/Makefile.am index 179f08daa..8d684b196 100644 --- a/tests/src/Makefile.am +++ b/tests/src/Makefile.am @@ -1,3 +1,7 @@ +# Disable compiler optimizations for this section +# of programs as it is known to be buggy with LD_PRELOAD. +CFLAGS = @CFLAGS@ -O0 + noinst_PROGRAMS = dbus-env \ initctl \ plymouth \ From a3f5981b35b19625daf0c67c2a5d999f8ee74222 Mon Sep 17 00:00:00 2001 From: JezerM Date: Wed, 9 Mar 2022 11:04:47 -0600 Subject: [PATCH 08/29] Fix inconsistency between lightdm_get_layout and lightdm_set_layout Use the global xkl_config to set the new layout instead of creating a new one Set the default_layout as dmlayout, allowing to get the new layout with lightdm_get_layout --- liblightdm-gobject/layout.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/liblightdm-gobject/layout.c b/liblightdm-gobject/layout.c index ff8d8749b..eec8f7877 100644 --- a/liblightdm-gobject/layout.c +++ b/liblightdm-gobject/layout.c @@ -148,6 +148,7 @@ void lightdm_set_layout (LightDMLayout *dmlayout) { g_return_if_fail (dmlayout != NULL); + lightdm_get_layouts(); g_debug ("Setting keyboard layout to '%s'", lightdm_layout_get_name (dmlayout)); @@ -155,17 +156,16 @@ lightdm_set_layout (LightDMLayout *dmlayout) g_autofree gchar *variant = NULL; parse_layout_string (lightdm_layout_get_name (dmlayout), &layout, &variant); - XklConfigRec *config = xkl_config_rec_new (); - config->layouts = g_malloc (sizeof (gchar *) * 2); - config->variants = g_malloc (sizeof (gchar *) * 2); - config->model = g_strdup (xkl_config->model); - config->layouts[0] = g_steal_pointer (&layout); - config->layouts[1] = NULL; - config->variants[0] = g_steal_pointer (&variant); - config->variants[1] = NULL; - if (!xkl_config_rec_activate (config, xkl_engine)) + if (layouts && xkl_config) + { + xkl_config->layouts[0] = g_steal_pointer(&layout); + xkl_config->layouts[1] = NULL; + xkl_config->variants[0] = g_steal_pointer(&variant); + xkl_config->variants[1] = NULL; + default_layout = dmlayout; + } + if (!xkl_config_rec_activate (xkl_config, xkl_engine)) g_warning ("Failed to activate XKL config"); - g_object_unref (config); } /** From 40c3b4d4cfd747707bae1fe3953527dcff650213 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 25 May 2022 14:45:45 +1200 Subject: [PATCH 09/29] Disable Ubuntu tests for now, until we can work out why they are failing --- .github/workflows/test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8b7e4f510..7df26a6a4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,7 +12,6 @@ jobs: fail-fast: false matrix: image: - - ubuntu:rolling - fedora:latest runs-on: ubuntu-latest From 1d1d1e4196b81147cf898ac6dfbe30fcd25d6b2d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 15 Jun 2022 10:50:03 +1200 Subject: [PATCH 10/29] Fix test against arrays that can never be NULL --- tests/src/libsystem.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/src/libsystem.c b/tests/src/libsystem.c index 81d367d95..1c68dc10b 100644 --- a/tests/src/libsystem.c +++ b/tests/src/libsystem.c @@ -1571,14 +1571,10 @@ pututxline (const struct utmpx *ut) default: g_string_append_printf (status, " TYPE=%d", ut->ut_type); } - if (ut->ut_line) - g_string_append_printf (status, " LINE=%s", ut->ut_line); - if (ut->ut_id) - g_string_append_printf (status, " ID=%s", ut->ut_id); - if (ut->ut_user) - g_string_append_printf (status, " USER=%s", ut->ut_user); - if (ut->ut_host) - g_string_append_printf (status, " HOST=%s", ut->ut_host); + g_string_append_printf (status, " LINE=%s", ut->ut_line); + g_string_append_printf (status, " ID=%s", ut->ut_id); + g_string_append_printf (status, " USER=%s", ut->ut_user); + g_string_append_printf (status, " HOST=%s", ut->ut_host); status_notify ("%s", status->str); } From 80147e515513261226d01a32c8b0c819f84e21e8 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 23 Jun 2022 16:57:20 +1200 Subject: [PATCH 11/29] No longer making releases --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 2d3618fce..9e8b4df7f 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,6 @@ Key features of LightDM are: - Supports remote login (incoming - XDMCP, VNC, outgoing - XDMCP, pluggable). - Comprehensive test suite. -Releases are synchronised with the [Ubuntu release schedule](https://wiki.ubuntu.com/Releases) and supported for the duration of each Ubuntu release. Each release is announced on the [mailing list](http://lists.freedesktop.org/mailman/listinfo/lightdm). - The core LightDM project does not provide any greeter with it and you should install a greeter appropriate to your system. Popular greeter projects are: * [LightDM GTK+ Greeter](https://github.com/Xubuntu/lightdm-gtk-greeter) - a greeter that has moderate requirements (GTK+). From 756d2323ad615e0ec98fa273c611de7b07ee2ca5 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 23 Jun 2022 16:59:10 +1200 Subject: [PATCH 12/29] Mailing list closed - use forum now --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e8b4df7f..b75f12287 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,6 @@ Configuration is in keyfile format. For most installations you will want to chan # Questions -Questions should be asked on the [mailing list](http://lists.freedesktop.org/mailman/listinfo/lightdm). All questions are welcome. +Discussion about LightDM should be done on the [forum](https://discourse.ubuntu.com/c/light-dm/107). All questions are welcome. [Stack Overflow](http://stackoverflow.com/search?q=lightdm) and [Ask Ubuntu](http://askubuntu.com/search?q=lightdm) are good sites for frequently asked questions. From 35326597c2f5d1e42c56feaf7f8aedac9c9d14ff Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 9 Feb 2022 10:25:54 +1300 Subject: [PATCH 13/29] Don't call setenv with a NULL value - the behaviour is undefined. --- src/process.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/process.c b/src/process.c index d25c909b0..aa614d361 100644 --- a/src/process.c +++ b/src/process.c @@ -248,7 +248,13 @@ process_start (Process *process, gboolean block) environ = NULL; #endif for (guint i = 0; i < env_length; i++) - setenv (env_keys[i], env_values[i], TRUE); + { + const gchar *value = env_values[i]; + if (value != NULL) + setenv (env_keys[i], value, TRUE); + else + unsetenv (env_keys[i]); + } /* Reset SIGPIPE handler so the child has default behaviour (we disabled it at LightDM start) */ signal (SIGPIPE, SIG_DFL); From 77a7c6b7b8ca896b98ef43826641bdd520650bfb Mon Sep 17 00:00:00 2001 From: silvan Date: Wed, 9 Mar 2022 11:23:18 +0100 Subject: [PATCH 14/29] config: set `logind-check-graphical=True` per default Without `logind-check-graphical=True` beeing set, lightdm is prone to a race condition, where lightdm has started before the graphics driver was loaded. --- data/lightdm.conf | 2 +- src/lightdm.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/data/lightdm.conf b/data/lightdm.conf index 16b80f7e3..0df384295 100644 --- a/data/lightdm.conf +++ b/data/lightdm.conf @@ -26,7 +26,7 @@ #lock-memory=true #user-authority-in-system-dir=false #guest-account-script=guest-account -#logind-check-graphical=false +#logind-check-graphical=true #log-directory=/var/log/lightdm #run-directory=/var/run/lightdm #cache-directory=/var/cache/lightdm diff --git a/src/lightdm.c b/src/lightdm.c index 81b91172b..72ac9e7cf 100644 --- a/src/lightdm.c +++ b/src/lightdm.c @@ -812,6 +812,8 @@ main (int argc, char **argv) } if (!config_has_key (config_get_instance (), "XDMCPServer", "hostname")) config_set_string (config_get_instance (), "XDMCPServer", "hostname", g_get_host_name ()); + if (!config_has_key (config_get_instance (), "LightDM", "logind-check-graphical")) + config_set_string (config_get_instance (), "LightDM", "logind-check-graphical", TRUE); /* Override defaults */ if (log_dir) From 9f2568af7143d99b707290f423ffb918a962e2e0 Mon Sep 17 00:00:00 2001 From: pan93412 <28441561+pan93412@users.noreply.github.com> Date: Wed, 14 Nov 2018 19:55:59 +0800 Subject: [PATCH 15/29] Update Chinese (Taiwan) Translations. --- po/zh_TW.po | 178 ++++++++++++++++++++++++++++------------------------ 1 file changed, 97 insertions(+), 81 deletions(-) diff --git a/po/zh_TW.po b/po/zh_TW.po index 2effb22d5..e89c71be4 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -6,95 +6,111 @@ msgid "" msgstr "" "Project-Id-Version: lightdm\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-06 11:05+0000\n" -"PO-Revision-Date: 2011-07-24 19:45+0000\n" -"Last-Translator: FULL NAME \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-06-21 12:34+1200\n" +"PO-Revision-Date: 2018-11-14 19:54+0800\n" +"Last-Translator: pan93412 \n" "Language-Team: Chinese (Traditional) \n" +"Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2013-08-09 05:11+0000\n" -"X-Generator: Launchpad (build 16723)\n" - -#: ../greeters/gtk/lightdm-gtk-greeter.c:409 -msgid "Are you sure you want to close all programs and restart the computer?" -msgstr "您確定要關閉所有程式,並重新啟動電腦?" - -#: ../greeters/gtk/greeter.ui.h:1 -msgid "Cancel" -msgstr "" - -#: ../greeters/gtk/lightdm-gtk-greeter.c:410 -msgid "Restart" -msgstr "" - -#: ../greeters/gtk/lightdm-gtk-greeter.c:434 -msgid "" -"Are you sure you want to close all programs and shutdown the computer?" -msgstr "您確定要關閉所有程式,並關閉電腦?" - -#: ../greeters/gtk/lightdm-gtk-greeter.c:435 -msgid "Shutdown" -msgstr "" - -#: ../greeters/gtk/greeter.ui.h:4 -msgid "Large Font" -msgstr "大字型" - -#: ../greeters/ldm-gtk-greeter.c:611 -msgid "High Constrast" -msgstr "" - -#: ../greeters/ldm-gtk-greeter.c:615 -msgid "Options" -msgstr "" - -#: ../greeters/ldm-gtk-greeter.c:620 -msgid "Language" -msgstr "" - -#: ../greeters/ldm-gtk-greeter.c:646 -msgid "Keyboard Layout" -msgstr "" +"X-Generator: Poedit 2.2\n" + +#: ../data/org.freedesktop.DisplayManager.AccountsService.policy.in.h:1 +msgid "Set properties of own user" +msgstr "設定使用者自己的屬性" + +#: ../data/org.freedesktop.DisplayManager.AccountsService.policy.in.h:2 +msgid "Authentication is required to set one's own greeter properties." +msgstr "設定某人自己的 greeter 屬性需要身份核對。" + +#: ../data/org.freedesktop.DisplayManager.AccountsService.policy.in.h:3 +msgid "Set properties of any user" +msgstr "設定任何使用者的屬性" + +#: ../data/org.freedesktop.DisplayManager.AccountsService.policy.in.h:4 +msgid "Authentication is required to get another user's greeter properties." +msgstr "取得其他使用者的 greeter 屬性需要身份核對。" + +#: ../data/org.freedesktop.DisplayManager.AccountsService.policy.in.h:5 +msgid "Authentication is required to set another user's greeter properties." +msgstr "設定其他使用者的 greeter 屬性需要身份核對。" + +#. Arguments and description for --help test +#: ../src/lightdm.c:568 +msgid "- Display Manager" +msgstr "- 顯示管理器" + +#. Help string for command line --config flag +#: ../src/lightdm.c:579 +msgid "Use configuration file" +msgstr "使用設定檔" + +#. Help string for command line --debug flag +#: ../src/lightdm.c:582 +msgid "Print debugging messages" +msgstr "顯示偵錯訊息" + +#. Help string for command line --test-mode flag +#: ../src/lightdm.c:585 +msgid "Run as unprivileged user, skipping things that require root access" +msgstr "以無特權使用者身份執行,跳過需要 root 存取權限的設定" + +#. Help string for command line --pid-file flag +#: ../src/lightdm.c:588 +msgid "File to write PID into" +msgstr "要寫入 PID 的檔案" + +#. Help string for command line --log-dir flag +#: ../src/lightdm.c:591 +msgid "Directory to write logs to" +msgstr "要寫入日誌檔案的目錄" + +#. Help string for command line --run-dir flag +#: ../src/lightdm.c:594 +msgid "Directory to store running state" +msgstr "要存放執行狀態的目錄" + +#. Help string for command line --cache-dir flag +#: ../src/lightdm.c:597 +msgid "Directory to cache information" +msgstr "要快取資訊的目錄" + +#. Help string for command line --show-config flag +#: ../src/lightdm.c:600 +msgid "Show combined configuration" +msgstr "顯示結合設定" + +#. Help string for command line --version flag +#: ../src/lightdm.c:603 +msgid "Show release version" +msgstr "顯示釋出版本" + +#. Text printed out when an unknown command-line argument provided +#: ../src/lightdm.c:614 +#, c-format +msgid "Run '%s --help' to see a full list of available command line options." +msgstr "執行「%s --help」顯示可用指令列選項的完整列表。" -#: ../greeters/ldm-gtk-greeter.c:668 -msgid "Session" -msgstr "" +#. Text printed out when an unknown command-line argument provided +#: ../src/dm-tool.c:29 +#, c-format +msgid "Run 'dm-tool --help' to see a full list of available command line options." +msgstr "執行「dm-tool --help」顯示可用指令列選項的完整列表。" -#: ../greeters/gtk/greeter.ui.h:8 -msgid "Suspend" -msgstr "暫停" +#~ msgid "Are you sure you want to close all programs and restart the computer?" +#~ msgstr "您確定要關閉所有程式,並重新啟動電腦?" -#: ../greeters/gtk/greeter.ui.h:2 -msgid "Hibernate" -msgstr "休眠" +#~ msgid "Are you sure you want to close all programs and shutdown the computer?" +#~ msgstr "您確定要關閉所有程式,並關閉電腦?" -#: ../greeters/gtk/greeter.ui.h:6 -msgid "Restart..." -msgstr "" +#~ msgid "Large Font" +#~ msgstr "大字型" -#: ../greeters/gtk/greeter.ui.h:7 -msgid "Shutdown..." -msgstr "" +#~ msgid "Suspend" +#~ msgstr "暫停" -#. Description on how to use Light Display Manager displayed on command-line -#: ../src/lightdm.c:100 -#, c-format -msgid "" -"Usage:\n" -" %s - Display Manager" -msgstr "" - -#. Description on how to use Light Display Manager displayed on command-line -#: ../src/lightdm.c:106 -#, c-format -msgid "" -"Help Options:\n" -" -c, --config Use configuration file\n" -" --pid-file File to write PID into\n" -" -d, --debug Print debugging messages\n" -" --test-mode Run as unprivileged user\n" -" -v, --version Show release version\n" -" -h, --help Show help options" -msgstr "" +#~ msgid "Hibernate" +#~ msgstr "休眠" From bb330c5db3966e4b9268b93645410f3ce4a557d6 Mon Sep 17 00:00:00 2001 From: 22-Team <45396333+22-Team@users.noreply.github.com> Date: Tue, 18 Dec 2018 00:11:02 +0400 Subject: [PATCH 16/29] Update az.po --- po/az.po | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/po/az.po b/po/az.po index 69a40b04e..698fb0adb 100644 --- a/po/az.po +++ b/po/az.po @@ -1,15 +1,15 @@ # Azerbaijani translation for lightdm # Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 # This file is distributed under the same license as the lightdm package. -# FIRST AUTHOR , 2012. +# Osman Kerimli , 2018. # msgid "" msgstr "" "Project-Id-Version: lightdm\n" -"Report-Msgid-Bugs-To: FULL NAME \n" +"Report-Msgid-Bugs-To: Osman Kerimli \n" "POT-Creation-Date: 2010-12-06 11:05+0000\n" -"PO-Revision-Date: 2012-04-14 10:57+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2018-12-18 00:11+0000\n" +"Last-Translator: Osman Kerimli \n" "Language-Team: Azerbaijani \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,64 +19,66 @@ msgstr "" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" -msgstr "" +msgstr "Bütün proqramları bağlayıb kompüteri yenidən başlatmaq istədiyinizə əmin" +"sinizmi?" #: ../greeters/gtk/greeter.ui.h:1 msgid "Cancel" -msgstr "" +msgstr "Ləğv et" #: ../greeters/gtk/lightdm-gtk-greeter.c:410 msgid "Restart" -msgstr "" +msgstr "Yenidən başlat" #: ../greeters/gtk/lightdm-gtk-greeter.c:434 msgid "" "Are you sure you want to close all programs and shutdown the computer?" msgstr "" +"Bütün proqramları bağlayıb kompüteri yenidən başlatmaq istədiyinizə əminsinizmi?" #: ../greeters/gtk/lightdm-gtk-greeter.c:435 msgid "Shutdown" -msgstr "" +msgstr "Söndür" #: ../greeters/gtk/greeter.ui.h:4 msgid "Large Font" -msgstr "" +msgstr "Böyük Şrift" #: ../greeters/ldm-gtk-greeter.c:611 msgid "High Constrast" -msgstr "" +msgstr "Yüksək Kontrast" #: ../greeters/ldm-gtk-greeter.c:615 msgid "Options" -msgstr "" +msgstr "Seçimlər" #: ../greeters/ldm-gtk-greeter.c:620 msgid "Language" -msgstr "" +msgstr "Dil" #: ../greeters/ldm-gtk-greeter.c:646 msgid "Keyboard Layout" -msgstr "" +msgstr "Klaviatura tərtibatı" #: ../greeters/ldm-gtk-greeter.c:668 msgid "Session" -msgstr "" +msgstr "Sessiya" #: ../greeters/gtk/greeter.ui.h:8 msgid "Suspend" -msgstr "" +msgstr "Dayandır" #: ../greeters/gtk/greeter.ui.h:2 msgid "Hibernate" -msgstr "" +msgstr "Qış yuxusu" #: ../greeters/gtk/greeter.ui.h:6 msgid "Restart..." -msgstr "" +msgstr "Yenidən başlat..." #: ../greeters/gtk/greeter.ui.h:7 msgid "Shutdown..." -msgstr "" +msgstr "Söndür..." #. Description on how to use Light Display Manager displayed on command-line #: ../src/lightdm.c:100 @@ -85,6 +87,8 @@ msgid "" "Usage:\n" " %s - Display Manager" msgstr "" +"İstifadə:\n" +" %s - Displey Menecer" #. Description on how to use Light Display Manager displayed on command-line #: ../src/lightdm.c:106 @@ -98,3 +102,10 @@ msgid "" " -v, --version Show release version\n" " -h, --help Show help options" msgstr "" +"Kömək Seçimləri:\n" +" -c, --config Konfiqurasiya faylı istifadə et\n" +" --pid-file PID-i yazmaq üçün fayl\n" +" -d, --debug Xəta arıdıcı mesajlarını dərc et\n" +" --test-mode İmtiyazsız istifadəçi kimi başlat\n" +" -v, --version Buraxılış versiyasını göstər\n" +" -h, --help Kömək seçimlərini göstər" From c8d8a4bf0bbba8d7ee84efd28b4d6a95945745d9 Mon Sep 17 00:00:00 2001 From: Mejans <61360811+Mejans@users.noreply.github.com> Date: Fri, 1 Oct 2021 20:07:16 +0200 Subject: [PATCH 17/29] Update oc.po --- po/oc.po | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/po/oc.po b/po/oc.po index 45ec21dc5..914a27cac 100644 --- a/po/oc.po +++ b/po/oc.po @@ -8,75 +8,75 @@ msgstr "" "Project-Id-Version: lightdm\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2010-12-06 11:05+0000\n" -"PO-Revision-Date: 2011-08-14 13:45+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2021-10-01 20:05+0200\n" "Language-Team: Occitan (post 1500) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2013-08-09 05:11+0000\n" -"X-Generator: Launchpad (build 16723)\n" +"X-Generator: Poedit 3.0\n" +"Last-Translator: Quentin PAGÈS\n" +"Language: oc\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" -msgstr "" +msgstr "Volètz vertadièrament quitar totes los programas e reaviar l’ordenador ?" #: ../greeters/gtk/greeter.ui.h:1 msgid "Cancel" -msgstr "" +msgstr "Anullar" #: ../greeters/gtk/lightdm-gtk-greeter.c:410 msgid "Restart" -msgstr "" +msgstr "Reaviar" #: ../greeters/gtk/lightdm-gtk-greeter.c:434 -msgid "" -"Are you sure you want to close all programs and shutdown the computer?" -msgstr "" +msgid "Are you sure you want to close all programs and shutdown the computer?" +msgstr "Volètz vertadièrament tampar totes los programas e atudar l’ordenador ?" #: ../greeters/gtk/lightdm-gtk-greeter.c:435 msgid "Shutdown" -msgstr "" +msgstr "Atudar" #: ../greeters/gtk/greeter.ui.h:4 msgid "Large Font" -msgstr "" +msgstr "Granda poliça" #: ../greeters/ldm-gtk-greeter.c:611 msgid "High Constrast" -msgstr "" +msgstr "Contraste elevat" #: ../greeters/ldm-gtk-greeter.c:615 msgid "Options" -msgstr "" +msgstr "Opcions" #: ../greeters/ldm-gtk-greeter.c:620 msgid "Language" -msgstr "" +msgstr "Lenga" #: ../greeters/ldm-gtk-greeter.c:646 msgid "Keyboard Layout" -msgstr "" +msgstr "Agençament del clavièr" #: ../greeters/ldm-gtk-greeter.c:668 msgid "Session" -msgstr "" +msgstr "Session" #: ../greeters/gtk/greeter.ui.h:8 msgid "Suspend" -msgstr "" +msgstr "Metre en velha" #: ../greeters/gtk/greeter.ui.h:2 msgid "Hibernate" -msgstr "" +msgstr "Ivernar" #: ../greeters/gtk/greeter.ui.h:6 msgid "Restart..." -msgstr "" +msgstr "Reaviada..." #: ../greeters/gtk/greeter.ui.h:7 msgid "Shutdown..." -msgstr "" +msgstr "Extincion..." #. Description on how to use Light Display Manager displayed on command-line #: ../src/lightdm.c:100 @@ -85,6 +85,8 @@ msgid "" "Usage:\n" " %s - Display Manager" msgstr "" +"Utilizacion :\n" +" %s - Display Manager" #. Description on how to use Light Display Manager displayed on command-line #: ../src/lightdm.c:106 @@ -98,3 +100,10 @@ msgid "" " -v, --version Show release version\n" " -h, --help Show help options" msgstr "" +"Opcions d’ajuda :\n" +" -c, --config Utilizar lo fichièr de configuracion\n" +" --pid-file Fichièr ont escriure los PID\n" +" -d, --debug Afichar los messatges de desbugatge\n" +" --test-mode Executar coma utilizaire sens privilègi\n" +" -v, --version Mostrar la version\n" +" -h, --help Mostrar las opcions d’ajuda" From 0c21d986ff3c9ec1568b681c746e30b6fd25d5cb Mon Sep 17 00:00:00 2001 From: lichangze Date: Tue, 19 Apr 2022 18:02:40 +0800 Subject: [PATCH 18/29] fix: block login if shell in nologin or false --- data/pam/lightdm-autologin | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/pam/lightdm-autologin b/data/pam/lightdm-autologin index ba7a68cef..157f469f2 100644 --- a/data/pam/lightdm-autologin +++ b/data/pam/lightdm-autologin @@ -1,4 +1,6 @@ #%PAM-1.0 +# Block login if shell in nologin or false +auth required pam_succeed_if.so shell notin /sbin/nologin:/usr/sbin/nologin:/bin/false:/usr/bin/false # Block login if they are globally disabled auth required pam_nologin.so From fe117f074137c38828076c14989e4c0ebbcb41aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Fu=C3=9F?= Date: Wed, 5 Jun 2019 17:42:18 +0200 Subject: [PATCH 19/29] Work around a race with password-less logins and double clicks There is a race in the greeter (greeter as in lightdm-gtk-greeter) easily triggered by double-clicking on the login button (or clicking it with a bouncing mouse button) with a password-less login. The problem arises when the daemon has already sent SERVER_MESSAGE_END_AUTHENTICATION to the greeter, but before it digests it, it handles more X11 events (e.g. the second click), sending the daemon a GREETER_MESSAGE_CONTINUE_AUTHENTICATION (before the GREETER_MESSAGE_START_SESSION) which will confuse handle_continue_authentication(), making it call session_respond_error(), which then sends a PAM_CONV_ERR to the session child, which will in turn get confused because it's expecting the (length of the) session error file name. As I don't really know how to avoid the race in the greeter (you would need to teach it prioritizing messages from the master over messages from X11), work around it by setting a flag in GreeterPrivate if SERVER_MESSAGE_END_AUTHENTICATION has been sent and ignore GREETER_MESSAGE_CONTINUE_AUTHENTICATION if that flag is set. The change was verified on 1.18.3 and then adopted to HEAD. --- src/greeter.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/greeter.c b/src/greeter.c index 50d0defd2..75fe9ff67 100644 --- a/src/greeter.c +++ b/src/greeter.c @@ -75,6 +75,14 @@ typedef struct /* TRUE if logging into guest session */ gboolean guest_account_authenticated; + /* Avoid a race where we already sent SERVER_MESSAGE_END_AUTHENTICATION to the greeter, + * but before it digests it, it handles more X11 events, sending us a GREETER_MESSAGE_CONTINUE_AUTHENTICATION + * (before the GREETER_MESSAGE_START_SESSION) which will confuse handle_continue_authentication(), + * calling session_respond_error(), which then sends a PAM_CONV_ERR to the session child, + * which will confuse that because it's expecting the (length of the) session error file name. + */ + gboolean have_sent_end_authentication; + /* Communication channels to communicate with */ int to_greeter_input; int from_greeter_output; @@ -410,11 +418,13 @@ send_end_authentication (Greeter *greeter, guint32 sequence_number, const gchar { guint8 message[MAX_MESSAGE_LENGTH]; gsize offset = 0; + GreeterPrivate *priv = greeter_get_instance_private (greeter); write_header (message, MAX_MESSAGE_LENGTH, SERVER_MESSAGE_END_AUTHENTICATION, int_length () + string_length (username) + int_length (), &offset); write_int (message, MAX_MESSAGE_LENGTH, sequence_number, &offset); write_string (message, MAX_MESSAGE_LENGTH, username, &offset); write_int (message, MAX_MESSAGE_LENGTH, result, &offset); write_message (greeter, message, offset); + priv->have_sent_end_authentication = TRUE; } void @@ -489,6 +499,7 @@ reset_session (Greeter *greeter) } priv->guest_account_authenticated = FALSE; + priv->have_sent_end_authentication = FALSE; } static void @@ -648,6 +659,12 @@ handle_continue_authentication (Greeter *greeter, gchar **secrets) size_t messages_length = session_get_messages_length (priv->authentication_session); const struct pam_message *messages = session_get_messages (priv->authentication_session); + /* We may have already sent SERVER_MESSAGE_END_AUTHENTICATION, but the greeter may not have digested it yet. */ + if (priv->have_sent_end_authentication) { + g_debug ("Ignoring continue authentication"); + return; + } + /* Check correct number of responses */ int n_prompts = 0; for (int i = 0; i < messages_length; i++) From 3fd8d5c0d909d4b7e8cab285a08410796cc69e69 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 11 Jul 2022 09:18:40 +1200 Subject: [PATCH 20/29] Fix crash due to using wrong method to set configuration Regression introduced in 77a7c6b7b8ca896b98ef43826641bdd520650bfb --- src/lightdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lightdm.c b/src/lightdm.c index 72ac9e7cf..74f9ff2d3 100644 --- a/src/lightdm.c +++ b/src/lightdm.c @@ -813,7 +813,7 @@ main (int argc, char **argv) if (!config_has_key (config_get_instance (), "XDMCPServer", "hostname")) config_set_string (config_get_instance (), "XDMCPServer", "hostname", g_get_host_name ()); if (!config_has_key (config_get_instance (), "LightDM", "logind-check-graphical")) - config_set_string (config_get_instance (), "LightDM", "logind-check-graphical", TRUE); + config_set_boolean (config_get_instance (), "LightDM", "logind-check-graphical", TRUE); /* Override defaults */ if (log_dir) From 506e4220f2d9041ffa4124cab18810aec6cb9b8b Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 18 Jul 2022 15:25:13 +1200 Subject: [PATCH 21/29] Fix tests broken by default config change in 77a7c6b7b8ca896b98ef43826641bdd520650bfb --- po/lightdm.pot | 2 +- tests/scripts/multi-seat-change-graphical-disabled.conf | 3 +++ tests/scripts/multi-seat-change-graphical.conf | 3 --- tests/scripts/multi-seat-non-graphical-disabled.conf | 3 +++ tests/scripts/multi-seat-non-graphical.conf | 3 --- tests/scripts/multi-seat-seat0-non-graphical-disabled.conf | 3 +++ tests/scripts/multi-seat-seat0-non-graphical.conf | 3 --- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/po/lightdm.pot b/po/lightdm.pot index 8e2297030..e960b8747 100644 --- a/po/lightdm.pot +++ b/po/lightdm.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-21 12:34+1200\n" +"POT-Creation-Date: 2022-07-18 15:24+1200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/tests/scripts/multi-seat-change-graphical-disabled.conf b/tests/scripts/multi-seat-change-graphical-disabled.conf index 3b3369fc6..50c527685 100644 --- a/tests/scripts/multi-seat-change-graphical-disabled.conf +++ b/tests/scripts/multi-seat-change-graphical-disabled.conf @@ -2,6 +2,9 @@ # Check seat graphical status is ignored # +[LightDM] +logind-check-graphical=false + #?*START-DAEMON #?RUNNER DAEMON-START diff --git a/tests/scripts/multi-seat-change-graphical.conf b/tests/scripts/multi-seat-change-graphical.conf index 8c2bded77..90d9ec764 100644 --- a/tests/scripts/multi-seat-change-graphical.conf +++ b/tests/scripts/multi-seat-change-graphical.conf @@ -2,9 +2,6 @@ # Check seat can change graphical status # -[LightDM] -logind-check-graphical=true - #?*START-DAEMON #?RUNNER DAEMON-START diff --git a/tests/scripts/multi-seat-non-graphical-disabled.conf b/tests/scripts/multi-seat-non-graphical-disabled.conf index f8371c005..ab628b5fd 100644 --- a/tests/scripts/multi-seat-non-graphical-disabled.conf +++ b/tests/scripts/multi-seat-non-graphical-disabled.conf @@ -2,6 +2,9 @@ # Check non graphical seats are started anyway # +[LightDM] +logind-check-graphical=false + #?*START-DAEMON #?RUNNER DAEMON-START diff --git a/tests/scripts/multi-seat-non-graphical.conf b/tests/scripts/multi-seat-non-graphical.conf index 45f045b99..b07533d1d 100644 --- a/tests/scripts/multi-seat-non-graphical.conf +++ b/tests/scripts/multi-seat-non-graphical.conf @@ -2,9 +2,6 @@ # Check non graphical seats are ignored # -[LightDM] -logind-check-graphical=true - #?*START-DAEMON #?RUNNER DAEMON-START diff --git a/tests/scripts/multi-seat-seat0-non-graphical-disabled.conf b/tests/scripts/multi-seat-seat0-non-graphical-disabled.conf index ddac61547..2a98bea5d 100644 --- a/tests/scripts/multi-seat-seat0-non-graphical-disabled.conf +++ b/tests/scripts/multi-seat-seat0-non-graphical-disabled.conf @@ -2,6 +2,9 @@ # Check seat0 is started even if it is marked as non-graphical # +[LightDM] +logind-check-graphical=false + [test-runner-config] seat0-can-graphical=false diff --git a/tests/scripts/multi-seat-seat0-non-graphical.conf b/tests/scripts/multi-seat-seat0-non-graphical.conf index f6c4233d3..b3925956b 100644 --- a/tests/scripts/multi-seat-seat0-non-graphical.conf +++ b/tests/scripts/multi-seat-seat0-non-graphical.conf @@ -2,9 +2,6 @@ # Check seat0 is started only once it becomes graphical # -[LightDM] -logind-check-graphical=true - [test-runner-config] seat0-can-graphical=false From 792baa54a53598fb46cbdec675e28f5d72d211eb Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 18 Jul 2022 15:42:26 +1200 Subject: [PATCH 22/29] Fix distcheck failure due to intltool file being left behind --- Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.am b/Makefile.am index fd252aa8c..c72c7dd69 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,3 +14,5 @@ EXTRA_DIST = \ COPYING.LGPL2 \ COPYING.LGPL3 \ NEWS + +DISTCLEANFILES = po/.intltool-merge-cache.lock From 4b10d07b7bf87668a245b438b5ffc82e3956bd1c Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 18 Jul 2022 15:05:16 +1200 Subject: [PATCH 23/29] Releasing 1.32.0 --- NEWS | 21 +++++++++++++++++++++ configure.ac | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 564c56255..f43b43aa0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,24 @@ +Overview of changes in lightdm 1.32.0 + + * Overwrite existing X authority files to avoid corruption + * Change logind-check-graphical default config value to true + * Block autologin if shell in nologin or false + * Fix failure if with greeters sending two login requests quickly. + * Drop Qt 4 support, it's been unsupported since 2015 + * Fix lightdm_set_layout + * Improve method of determining a session is Wayland + * Don't call setenv with a NULL value - the behaviour is undefined + * Replace deprecated QAbstractItemModel::setRoleNames + * Move D-Bus conf file to $(datadir)/dbus-1/system.d + * Fix tests failing when compiled with --with-greeter-user + * Use Python 3 in tests + * Disable compiler optimizations for test programs + * Compilation fix for glibc 2.33 + * Remove deprecated use of G_TYPE_INSTANCE_GET_PRIVATE, G_PARAM_PRIVATE + * Fix compile failure due to use of clearenv on FreeBSD + * Use a size_t to resolve a compile warning + * Fix DesktopManager typo in man page + Overview of changes in lightdm 1.30.0 * Add lightdm_user_get_is_locked () diff --git a/configure.ac b/configure.ac index 7e2b4eeb5..29c529c66 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(lightdm, 1.30.0) +AC_INIT(lightdm, 1.32.0) AC_CONFIG_MACRO_DIR(m4) AC_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz foreign]) From 78a672408d1c3a478633d998216100d7a2081f8b Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 9 Aug 2022 12:35:07 +1200 Subject: [PATCH 24/29] * New upstream release: - Overwrite existing X authority files to avoid corruption - Change logind-check-graphical default config value to true - Block autologin if shell in nologin or false - Fix failure if with greeters sending two login requests quickly. - Drop Qt 4 support, it's been unsupported since 2015 - Fix lightdm_set_layout - Improve method of determining a session is Wayland - Don't call setenv with a NULL value - the behaviour is undefined - Replace deprecated QAbstractItemModel::setRoleNames - Move D-Bus conf file to $(datadir)/dbus-1/system.d - Fix tests failing when compiled with --with-greeter-user - Use Python 3 in tests - Disable compiler optimizations for test programs - Compilation fix for glibc 2.33 - Remove deprecated use of G_TYPE_INSTANCE_GET_PRIVATE, G_PARAM_PRIVATE - Fix compile failure due to use of clearenv on FreeBSD - Use a size_t to resolve a compile warning - Fix DesktopManager typo in man page * debian/lightdm.install: - Update for new D-Bus config location --- debian/changelog | 26 ++++++++++++++++++++++++++ debian/lightdm.install | 1 - 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 28f2063b6..2478a457a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,29 @@ +lightdm (1.32.0-0ubuntu1) UNRELEASED; urgency=medium + + * New upstream release: + - Overwrite existing X authority files to avoid corruption + - Change logind-check-graphical default config value to true + - Block autologin if shell in nologin or false + - Fix failure if with greeters sending two login requests quickly. + - Drop Qt 4 support, it's been unsupported since 2015 + - Fix lightdm_set_layout + - Improve method of determining a session is Wayland + - Don't call setenv with a NULL value - the behaviour is undefined + - Replace deprecated QAbstractItemModel::setRoleNames + - Move D-Bus conf file to $(datadir)/dbus-1/system.d + - Fix tests failing when compiled with --with-greeter-user + - Use Python 3 in tests + - Disable compiler optimizations for test programs + - Compilation fix for glibc 2.33 + - Remove deprecated use of G_TYPE_INSTANCE_GET_PRIVATE, G_PARAM_PRIVATE + - Fix compile failure due to use of clearenv on FreeBSD + - Use a size_t to resolve a compile warning + - Fix DesktopManager typo in man page + * debian/lightdm.install: + - Update for new D-Bus config location + + -- Robert Ancell Tue, 09 Aug 2022 12:30:51 +1200 + lightdm (1.30.0-0ubuntu1) eoan; urgency=medium * New upstream release: diff --git a/debian/lightdm.install b/debian/lightdm.install index 87d0e2deb..0b9004416 100644 --- a/debian/lightdm.install +++ b/debian/lightdm.install @@ -7,7 +7,6 @@ usr/share/locale usr/share/polkit-1 usr/lib/lightdm usr/bin -etc/dbus-1/ etc/lightdm/users.conf etc/lightdm/lightdm.conf usr/share/doc/lightdm/ etc/lightdm/keys.conf usr/share/doc/lightdm/ From eeefd110aa57809a46b4bed27e6103d65502cbab Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 9 Aug 2022 10:15:53 -0400 Subject: [PATCH 25/29] lightdm: Honor VNCServer's command in sanity check. Fixes #264. * src/lightdm.c (start_display_manager): Validate if the VNCServer command provided binary is available; fallback to 'Xvnc' otherwise. --- src/lightdm.c | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/src/lightdm.c b/src/lightdm.c index 74f9ff2d3..0ccfcd78f 100644 --- a/src/lightdm.c +++ b/src/lightdm.c @@ -349,27 +349,42 @@ start_display_manager (void) /* Start the VNC server */ if (config_get_boolean (config_get_instance (), "VNCServer", "enabled")) { - g_autofree gchar *path = g_find_program_in_path ("Xvnc"); - if (path) + /* Validate that a the VNC command is available. */ + g_autofree gchar *command = config_get_string (config_get_instance (), "VNCServer", "command"); + if (command) { - vnc_server = vnc_server_new (); - if (config_has_key (config_get_instance (), "VNCServer", "port")) + g_auto(GStrv) tokens = g_strsplit (command, " ", 2); + if (!g_find_program_in_path (tokens[0])) { - gint port = config_get_integer (config_get_instance (), "VNCServer", "port"); - if (port > 0) - vnc_server_set_port (vnc_server, port); + g_warning ("Can't start VNC server; command '%s' not found", tokens[0]); + return; } - g_autofree gchar *listen_address = config_get_string (config_get_instance (), "VNCServer", "listen-address"); - vnc_server_set_listen_address (vnc_server, listen_address); - g_signal_connect (vnc_server, VNC_SERVER_SIGNAL_NEW_CONNECTION, G_CALLBACK (vnc_connection_cb), NULL); - - g_debug ("Starting VNC server on TCP/IP port %d", vnc_server_get_port (vnc_server)); - vnc_server_start (vnc_server); } else - g_warning ("Can't start VNC server, Xvnc is not in the path"); + { + /* Fallback to 'Xvnc'. */ + if (!g_find_program_in_path ("Xvnc")) { + g_warning ("Can't start VNC server; 'Xvnc' command not found"); + return; + } + } + + vnc_server = vnc_server_new (); + if (config_has_key (config_get_instance (), "VNCServer", "port")) + { + gint port = config_get_integer (config_get_instance (), "VNCServer", "port"); + if (port > 0) + vnc_server_set_port (vnc_server, port); + } + g_autofree gchar *listen_address = config_get_string (config_get_instance (), "VNCServer", "listen-address"); + vnc_server_set_listen_address (vnc_server, listen_address); + g_signal_connect (vnc_server, VNC_SERVER_SIGNAL_NEW_CONNECTION, G_CALLBACK (vnc_connection_cb), NULL); + + g_debug ("Starting VNC server on TCP/IP port %d", vnc_server_get_port (vnc_server)); + vnc_server_start (vnc_server); } } + static void service_ready_cb (DisplayManagerService *service) { From 658952997c5cd05c148b6c288739af2c6dd5c40f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 9 Aug 2022 13:05:05 -0400 Subject: [PATCH 26/29] x-server-local: Correctly order command line arguments. When providing the VNCServer command as 'Xvnc -SecurityTypes None', the formatted command line used would look like: Xvnc -SecurityTypes None :1 -auth /var/run/lightdm/root/:1 which is invalid (the display number must appear first). * src/x-server-local.c (x_server_local_start): Format the command placing the display number before any other provided arguments. --- src/x-server-local.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/x-server-local.c b/src/x-server-local.c index 7c4ab8707..6c540d18c 100644 --- a/src/x-server-local.c +++ b/src/x-server-local.c @@ -463,14 +463,20 @@ x_server_local_start (DisplayServer *display_server) l_debug (display_server, "Logging to %s", log_file); g_autofree gchar *absolute_command = get_absolute_command (priv->command); + g_auto(GStrv) tokens = g_strsplit (absolute_command, " ", 2); + const gchar* binary = tokens[0]; + const gchar *extra_options = tokens[1]; + if (!absolute_command) { l_debug (display_server, "Can't launch X server %s, not found in path", priv->command); stopped_cb (priv->x_server_process, X_SERVER_LOCAL (server)); return FALSE; } - g_autoptr(GString) command = g_string_new (absolute_command); + g_autoptr(GString) command = g_string_new (binary); + /* The display argument must be given first when the X server used + * is Xvnc. */ g_string_append_printf (command, " :%d", priv->display_number); if (priv->config_file) @@ -513,6 +519,12 @@ x_server_local_start (DisplayServer *display_server) if (X_SERVER_LOCAL_GET_CLASS (server)->add_args) X_SERVER_LOCAL_GET_CLASS (server)->add_args (server, command); + /* Any extra user options provided via the VNCServer 'command' + * config option are appended last, so the user can override any + * of the above. */ + if (extra_options) + g_string_append_printf (command, " %s", extra_options); + process_set_command (priv->x_server_process, command->str); l_debug (display_server, "Launching X Server"); From ba7f6efc5c802aa87520b526ab5bc72b81669311 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 9 Aug 2022 16:10:28 -0400 Subject: [PATCH 27/29] x-server-xvnc: Adjust default color depth to match upstream TigerVNC. There is no longer support for 8 bit color depth in TigerVNC (see: https://github.com/TigerVNC/tigervnc/commit/e86d8720ba1e79b486ca29a5c2b27fa25811e6a2); using it causes a fatal error. * src/x-server-xvnc.c (x_server_xvnc_init): Set default depth to 24 bit. * tests/scripts/vnc-command.conf (command): Adjust accordingly. * tests/scripts/vnc-guest.conf (user-session): Likewise. * tests/scripts/vnc-login.conf (user-session): Likewise. * tests/scripts/vnc-open-file-descriptors.conf (user-session): Likewise. * data/lightdm.conf: Likewise. --- data/lightdm.conf | 2 +- src/x-server-xvnc.c | 2 +- tests/scripts/vnc-command.conf | 2 +- tests/scripts/vnc-guest.conf | 2 +- tests/scripts/vnc-login.conf | 2 +- tests/scripts/vnc-open-file-descriptors.conf | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/lightdm.conf b/data/lightdm.conf index 0df384295..60e3e8b40 100644 --- a/data/lightdm.conf +++ b/data/lightdm.conf @@ -160,4 +160,4 @@ #listen-address= #width=1024 #height=768 -#depth=8 +#depth=24 diff --git a/src/x-server-xvnc.c b/src/x-server-xvnc.c index 68340d533..27ca4454d 100644 --- a/src/x-server-xvnc.c +++ b/src/x-server-xvnc.c @@ -127,7 +127,7 @@ x_server_xvnc_init (XServerXVNC *server) XServerXVNCPrivate *priv = x_server_xvnc_get_instance_private (server); priv->width = 1024; priv->height = 768; - priv->depth = 8; + priv->depth = 24; } static void diff --git a/tests/scripts/vnc-command.conf b/tests/scripts/vnc-command.conf index 0f1e25fde..335956d92 100644 --- a/tests/scripts/vnc-command.conf +++ b/tests/scripts/vnc-command.conf @@ -19,7 +19,7 @@ command=Xvnc -option #?VNC-CLIENT CONNECT # Xvnc server starts -#?XVNC-0 START GEOMETRY=1024x768 DEPTH=8 OPTION=TRUE +#?XVNC-0 START GEOMETRY=1024x768 DEPTH=24 OPTION=TRUE # Daemon connects when X server is ready #?*XVNC-0 INDICATE-READY diff --git a/tests/scripts/vnc-guest.conf b/tests/scripts/vnc-guest.conf index 431bb244d..ce2b97dba 100644 --- a/tests/scripts/vnc-guest.conf +++ b/tests/scripts/vnc-guest.conf @@ -21,7 +21,7 @@ user-session=default #?VNC-CLIENT CONNECT # Xvnc server starts -#?XVNC-0 START GEOMETRY=1024x768 DEPTH=8 OPTION=FALSE +#?XVNC-0 START GEOMETRY=1024x768 DEPTH=24 OPTION=FALSE # Daemon connects when X server is ready #?*XVNC-0 INDICATE-READY diff --git a/tests/scripts/vnc-login.conf b/tests/scripts/vnc-login.conf index cdfe17b83..f0d65b7fc 100644 --- a/tests/scripts/vnc-login.conf +++ b/tests/scripts/vnc-login.conf @@ -21,7 +21,7 @@ user-session=default #?VNC-CLIENT CONNECT # Xvnc server starts -#?XVNC-0 START GEOMETRY=1024x768 DEPTH=8 OPTION=FALSE +#?XVNC-0 START GEOMETRY=1024x768 DEPTH=24 OPTION=FALSE # Daemon connects when X server is ready #?*XVNC-0 INDICATE-READY diff --git a/tests/scripts/vnc-open-file-descriptors.conf b/tests/scripts/vnc-open-file-descriptors.conf index 753c84dd5..e5d357308 100644 --- a/tests/scripts/vnc-open-file-descriptors.conf +++ b/tests/scripts/vnc-open-file-descriptors.conf @@ -21,7 +21,7 @@ user-session=default #?VNC-CLIENT CONNECT # Xvnc server starts -#?XVNC-0 START GEOMETRY=1024x768 DEPTH=8 OPTION=FALSE +#?XVNC-0 START GEOMETRY=1024x768 DEPTH=24 OPTION=FALSE # Daemon connects when X server is ready #?*XVNC-0 INDICATE-READY From 7a8462fdbe70c6fff4b6a9ccf27d45056c66d593 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 27 Oct 2022 16:26:52 +1300 Subject: [PATCH 28/29] Add a build rule to sign tarball --- Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.am b/Makefile.am index c72c7dd69..0fa06b607 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,3 +16,6 @@ EXTRA_DIST = \ NEWS DISTCLEANFILES = po/.intltool-merge-cache.lock + +lightdm-${VERSION}.tar.xz.asc: lightdm-${VERSION}.tar.xz + gpg --armor --detach-sig --sign $< From de09f2c34175b44e12c4a49c87905812576f9661 Mon Sep 17 00:00:00 2001 From: Dan Streetman Date: Fri, 5 Nov 2021 09:12:17 -0400 Subject: [PATCH 29/29] Suppress log errors for missing pam modules LP: #1949970 --- debian/lightdm.lightdm-greeter.pam | 12 ++++++------ debian/lightdm.pam | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/debian/lightdm.lightdm-greeter.pam b/debian/lightdm.lightdm-greeter.pam index 35736d327..d29f79b34 100644 --- a/debian/lightdm.lightdm-greeter.pam +++ b/debian/lightdm.lightdm-greeter.pam @@ -1,15 +1,15 @@ #%PAM-1.0 auth required pam_permit.so -auth optional pam_gnome_keyring.so -auth optional pam_kwallet.so -auth optional pam_kwallet5.so +-auth optional pam_gnome_keyring.so +-auth optional pam_kwallet.so +-auth optional pam_kwallet5.so @include common-account session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close session required pam_limits.so @include common-session session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open -session optional pam_gnome_keyring.so auto_start -session optional pam_kwallet.so auto_start -session optional pam_kwallet5.so auto_start +-session optional pam_gnome_keyring.so auto_start +-session optional pam_kwallet.so auto_start +-session optional pam_kwallet5.so auto_start session required pam_env.so readenv=1 session required pam_env.so readenv=1 user_readenv=1 envfile=/etc/default/locale diff --git a/debian/lightdm.pam b/debian/lightdm.pam index 123ef3b11..b7e732898 100644 --- a/debian/lightdm.pam +++ b/debian/lightdm.pam @@ -2,18 +2,18 @@ auth requisite pam_nologin.so auth sufficient pam_succeed_if.so user ingroup nopasswdlogin @include common-auth -auth optional pam_gnome_keyring.so -auth optional pam_kwallet.so -auth optional pam_kwallet5.so +-auth optional pam_gnome_keyring.so +-auth optional pam_kwallet.so +-auth optional pam_kwallet5.so @include common-account session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close #session required pam_loginuid.so session required pam_limits.so @include common-session session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open -session optional pam_gnome_keyring.so auto_start -session optional pam_kwallet.so auto_start -session optional pam_kwallet5.so auto_start +-session optional pam_gnome_keyring.so auto_start +-session optional pam_kwallet.so auto_start +-session optional pam_kwallet5.so auto_start session required pam_env.so readenv=1 session required pam_env.so readenv=1 user_readenv=1 envfile=/etc/default/locale @include common-password