From 5623e8d613d31e870dec3c10587658c2642543c2 Mon Sep 17 00:00:00 2001 From: Brian Cameron Date: Tue, 28 Nov 2006 17:01:38 +0000 Subject: Fix for TryExec check in gdmsession.c so that it does not pass arguments 2006-11-28 Brian Cameron * gui/gdmsession.c: Fix for TryExec check in gdmsession.c so that it does not pass arguments into g_find_program_in_path since it causes it to say it is not executable if arguments are passed in. --- ChangeLog | 7 +++++++ gui/gdmsession.c | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d78189ee..a051af5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-11-28 Brian Cameron + + * gui/gdmsession.c: Fix for TryExec check in gdmsession.c so + that it does not pass arguments into g_find_program_in_path + since it causes it to say it is not executable if arguments + are passed in. + 2006-11-27 Brian Cameron * gui/gdmlanguages.c, config/locale.alias: Rename Panjabi to diff --git a/gui/gdmsession.c b/gui/gdmsession.c index 62be6380..92a50d18 100644 --- a/gui/gdmsession.c +++ b/gui/gdmsession.c @@ -204,7 +204,13 @@ gdm_session_list_init () tryexec = ve_config_get_string (cfg, "Desktop Entry/TryExec"); if ( ! ve_string_empty (tryexec)) { - char *full = g_find_program_in_path (tryexec); + char **tryexecvec = g_strsplit (tryexec, " ", -1); + char *full = NULL; + + /* Do not pass any arguments to g_find_program_in_path */ + if (tryexecvec != NULL) + full = g_find_program_in_path (tryexecvec[0]); + if (full == NULL) { session = g_new0 (GdmSession, 1); session->name = g_strdup (dent->d_name); @@ -216,6 +222,7 @@ gdm_session_list_init () dent = readdir (sessdir); continue; } + g_strfreev (tryexecvec); g_free (full); } g_free (tryexec); -- cgit v1.2.1