Honor the Xvnc command specified in the config instead of using a hard-coded default. Submitted upstream at: https://github.com/canonical/lightdm/pull/265 diff --git a/src/lightdm.c b/src/lightdm.c index 74f9ff2d..0ccfcd78 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) { le?): Check for ‘gpg-command’ only. Remove all ‘test-skip’ statements. * tests/derivations.scm: Likewise. * tests/git-authenticate.scm: Likewise. * tests/git.scm: Likewise. * tests/import-git.scm: Likewise. Ludovic Courtès 2022-02-14git-authenticate: Ensure the target is a descendant of the introductory commit....Fixes a bug whereby authentication of a commit *not* descending from the introductory commit could succeed, provided the commit verifies the authorization invariant. In the example below, A is a common ancestor of the introductory commit I and of commit X. Authentication of X would succeed, even though it is not a descendant of I, as long as X is authorized according to the '.guix-authorizations' in A: X I \ / A This is because, 'authenticate-repository' would not check whether X descends from I, and the call (commit-difference X I) would return X. In practice that only affects forks because it means that ancestors of the introductory commit already contain a '.guix-authorizations' file. * guix/git-authenticate.scm (authenticate-repository): Add call to 'commit-descendant?'. * tests/channels.scm ("authenticate-channel, not a descendant of introductory commit"): New test. * tests/git-authenticate.scm ("authenticate-repository, target not a descendant of intro"): New test. * tests/guix-git-authenticate.sh: Expect earlier test to fail since 9549f0283a78fe36f2d4ff2a04ef8ad6b0c02604 is not a descendant of $intro_commit. Add new test targeting an ancestor of the introductory commit, and another test targeting the v1.2.0 commit. * doc/guix.texi (Specifying Channel Authorizations): Add a sentence. Ludovic Courtès 2022-02-14git-authenticate: Test introductory commit signature verification....These tests mimic similar tests already in 'tests/channels.scm', but without using the higher-level 'authenticate-channel'. * tests/git-authenticate.scm ("introductory commit, valid signature") ("introductory commit, missing signature") ("introductory commit, wrong signature"): New tests. Ludovic Courtès 2021-12-22tests: Move keys into ./tests/keys/ and add a third ed25519 key....The third key will be used in an upcoming commit. Rename public keys to .pub. * guix/tests/gnupg.scm (%ed25519-3-public-key-file): New variable. (%ed25519-3-secret-key-file): New variable. (%ed25519-2-public-key-file): Renamed from %ed25519bis-public-key-file. (%ed25519-2-secret-key-file): Renamed from %ed25519bis-secret-key-file. * tests/keys/ed25519-3.key: New file. * tests/keys/ed25519-3.sec: New file. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Attila Lendvai