gdm r6269 - in branches/gnome-2-20: . daemon
- From: bcameron svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r6269 - in branches/gnome-2-20: . daemon
- Date: Mon, 16 Jun 2008 20:47:13 +0000 (UTC)
Author: bcameron
Date: Mon Jun 16 20:47:13 2008
New Revision: 6269
URL: http://svn.gnome.org/viewvc/gdm?rev=6269&view=rev
Log:
2008-06-16 Brian Cameron <brian cameron sun com>
* daemon/slave.c: When processing BaseXsession, only accept the
first word. Since the slave calls g_access with this value,
it will fail if there is more than one word or even trailing
space in this configuration value. Makes the code a bit more
robust.
Modified:
branches/gnome-2-20/ChangeLog
branches/gnome-2-20/daemon/slave.c
Modified: branches/gnome-2-20/daemon/slave.c
==============================================================================
--- branches/gnome-2-20/daemon/slave.c (original)
+++ branches/gnome-2-20/daemon/slave.c Mon Jun 16 20:47:13 2008
@@ -3854,9 +3854,10 @@
if (sessionexec != NULL) {
const char *basexsession = gdm_daemon_config_get_value_string (GDM_KEY_BASE_XSESSION);
+ char **bxvec = g_strsplit (basexsession, " ", -1);
/* cannot be possibly failsafe */
- if G_UNLIKELY (g_access (basexsession, X_OK) != 0) {
+ if G_UNLIKELY (bxvec == NULL || g_access (bxvec[0], X_OK) != 0) {
gdm_error (_("%s: Cannot find or run the base Xsession script. Running the GNOME failsafe session instead."),
"session_child_run");
session = GDM_SESSION_FAILSAFE_GNOME;
@@ -3870,7 +3871,7 @@
* we really DON'T care about leaks, we are going to
* exec in just a bit
*/
- g_string_append (fullexec, basexsession);
+ g_string_append (fullexec, bxvec[0]);
g_string_append (fullexec, " ");
#ifdef HAVE_TSOL
@@ -3879,6 +3880,7 @@
#endif
g_string_append (fullexec, sessionexec);
}
+ g_strfreev (bxvec);
}
if (strcmp (session, GDM_SESSION_FAILSAFE_GNOME) == 0) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]