lightdm: Add patch to fix some warnings

+63
+2
pkgs/applications/display-managers/lightdm/default.nix
··· 15 15 sha256 = "0f0c2irb7qq49dabxhh99bwyvkxpfpscy4vynm7y800sz15lm2hs"; 16 16 }; 17 17 18 + patches = [ ./fix-paths.patch ]; 19 + 18 20 buildInputs = [ 19 21 pkgconfig pam libxcb glib libXdmcp itstool libxml2 intltool libxklavier libgcrypt 20 22 qt4
+61
pkgs/applications/display-managers/lightdm/fix-paths.patch
··· 1 + diff --git a/common/user-list.c b/common/user-list.c 2 + index 792c6d3..57fbfb7 100644 3 + --- a/common/user-list.c 4 + +++ b/common/user-list.c 5 + @@ -331,7 +331,7 @@ load_passwd_file (CommonUserList *user_list, gboolean emit_add_signal) 6 + 7 + value = g_key_file_get_string (config, "UserList", "hidden-shells", NULL); 8 + if (!value) 9 + - value = g_strdup ("/bin/false /usr/sbin/nologin"); 10 + + value = g_strdup ("/run/current-system/sw/bin/nologin"); 11 + hidden_shells = g_strsplit (value, " ", -1); 12 + g_free (value); 13 + 14 + diff --git a/src/seat.c b/src/seat.c 15 + index f9b149d..9029742 100644 16 + --- a/src/seat.c 17 + +++ b/src/seat.c 18 + @@ -343,7 +343,7 @@ run_script (Seat *seat, DisplayServer *display_server, const gchar *script_name, 19 + 20 + /* Set POSIX variables */ 21 + process_set_clear_environment (script, TRUE); 22 + - process_set_env (script, "SHELL", "/bin/sh"); 23 + + process_set_env (script, "SHELL", "/run/current-system/sw/bin/sh"); 24 + 25 + /* Variables required for regression tests */ 26 + if (g_getenv ("LIGHTDM_TEST_ROOT")) 27 + @@ -354,7 +354,7 @@ run_script (Seat *seat, DisplayServer *display_server, const gchar *script_name, 28 + process_set_env (script, "PATH", g_getenv ("PATH")); 29 + } 30 + else 31 + - process_set_env (script, "PATH", "/usr/local/bin:/usr/bin:/bin"); 32 + + process_set_env (script, "PATH", "/run/current-system/sw/bin"); 33 + 34 + if (user) 35 + { 36 + diff --git a/src/session-child.c b/src/session-child.c 37 + index e85f57d..93db0bd 100644 38 + --- a/src/session-child.c 39 + +++ b/src/session-child.c 40 + @@ -410,7 +410,7 @@ session_child_run (int argc, char **argv) 41 + else 42 + { 43 + /* Set POSIX variables */ 44 + - pam_putenv (pam_handle, "PATH=/usr/local/bin:/usr/bin:/bin"); 45 + + pam_putenv (pam_handle, "PATH=/run/current-system/sw/bin"); 46 + pam_putenv (pam_handle, g_strdup_printf ("USER=%s", username)); 47 + pam_putenv (pam_handle, g_strdup_printf ("LOGNAME=%s", username)); 48 + pam_putenv (pam_handle, g_strdup_printf ("HOME=%s", user_get_home_directory (user))); 49 + diff --git a/src/shared-data-manager.c b/src/shared-data-manager.c 50 + index 47f1c10..cc82652 100644 51 + --- a/src/shared-data-manager.c 52 + +++ b/src/shared-data-manager.c 53 + @@ -68,7 +68,7 @@ delete_unused_user (gpointer key, gpointer value, gpointer user_data) 54 + 55 + gchar *path = g_build_filename (USERS_DIR, user, NULL); 56 + gchar *quoted_path = g_shell_quote (path); 57 + - gchar *cmd = g_strdup_printf ("/bin/rm -rf %s", quoted_path); 58 + + gchar *cmd = g_strdup_printf ("/run/current-system/sw/bin/rm -rf %s", quoted_path); 59 + 60 + g_spawn_command_line_async (cmd, &error); 61 + if (error)