gdm r6631 - in branches/gnome-2-20: . daemon gui



Author: bcameron
Date: Wed Dec 10 09:52:53 2008
New Revision: 6631
URL: http://svn.gnome.org/viewvc/gdm?rev=6631&view=rev

Log:
2008-12-10 Brian Cameron <brian cameron sun com>

        * daemon/gdm-daemon-config.c, gui/gdmsession.c: Conditionally show
          multilabel session entires when using Trusted Solaris.


Modified:
   branches/gnome-2-20/ChangeLog
   branches/gnome-2-20/daemon/gdm-daemon-config.c
   branches/gnome-2-20/gui/gdmsession.c

Modified: branches/gnome-2-20/daemon/gdm-daemon-config.c
==============================================================================
--- branches/gnome-2-20/daemon/gdm-daemon-config.c	(original)
+++ branches/gnome-2-20/daemon/gdm-daemon-config.c	Wed Dec 10 09:52:53 2008
@@ -1615,6 +1615,9 @@
 			      GdmConfigValue     *value)
 {
 	const char *str;
+#ifdef HAVE_TSOL
+	char *new;
+#endif
 
 	str = gdm_config_value_get_string (value);
 
@@ -1622,6 +1625,12 @@
 		gdm_error (_("%s: No sessions directory specified."), "gdm_config_parse");
 	}
 
+#ifdef HAVE_TSOL
+	new = g_strconcat (str, ":" DATADIR "/xsessions/multilabel/", NULL);
+	gdm_config_value_set_string (value, new);
+	g_free (new);
+#endif
+
 	return TRUE;
 }
 

Modified: branches/gnome-2-20/gui/gdmsession.c
==============================================================================
--- branches/gnome-2-20/gui/gdmsession.c	(original)
+++ branches/gnome-2-20/gui/gdmsession.c	Wed Dec 10 09:52:53 2008
@@ -30,6 +30,10 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 
+#ifdef HAVE_TSOL
+#include <tsol/label.h>
+#endif
+
 #include "gdm.h"
 #include "gdmsession.h"
 #include "gdmcommon.h"
@@ -167,6 +171,12 @@
 	 ":", -1);
     for (i = 0; vec != NULL && vec[i] != NULL; i++) {
 	    const char *dir = vec[i];
+#ifdef HAVE_TSOL
+	    /* skip the multilabel dir if the system is not labeled */
+           if (!is_system_labeled () &&
+               strcmp (dir, DATADIR "/xsessions/multilabel/") == 0)
+                   continue;
+#endif
 
 	    /* Check that session dir is readable */
 	    if G_UNLIKELY (dir == NULL || access (dir, R_OK|X_OK) != 0)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]