diff options
author | Brian Cameron <brian.cameron@sun.com> | 2008-12-10 09:52:53 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2008-12-10 09:52:53 +0000 |
commit | 1abccc329decfd2b6158080bab80b20316e6ac7a (patch) | |
tree | 1b3448b42fa36c0c015d52b40f0229304a64d893 | |
parent | 02b96d056875ea1e9909f2318f6aa4eba0774852 (diff) | |
download | gdm-1abccc329decfd2b6158080bab80b20316e6ac7a.tar.gz |
Conditionally show multilabel session entires when using Trusted Solaris.
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.
svn path=/branches/gnome-2-20/; revision=6631
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | daemon/gdm-daemon-config.c | 9 | ||||
-rw-r--r-- | gui/gdmsession.c | 10 |
3 files changed, 24 insertions, 0 deletions
@@ -1,5 +1,10 @@ 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. + +2008-12-10 Brian Cameron <brian.cameron@sun.com> + * daemon/slave.c: Use full path to chmod when setting ACL's with ZFS filesystems. diff --git a/daemon/gdm-daemon-config.c b/daemon/gdm-daemon-config.c index b4bd9725..68f41cd1 100644 --- a/daemon/gdm-daemon-config.c +++ b/daemon/gdm-daemon-config.c @@ -1615,6 +1615,9 @@ validate_session_desktop_dir (GdmConfig *config, GdmConfigValue *value) { const char *str; +#ifdef HAVE_TSOL + char *new; +#endif str = gdm_config_value_get_string (value); @@ -1622,6 +1625,12 @@ validate_session_desktop_dir (GdmConfig *config, 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; } diff --git a/gui/gdmsession.c b/gui/gdmsession.c index 80823e46..a8d954a6 100644 --- a/gui/gdmsession.c +++ b/gui/gdmsession.c @@ -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 @@ _gdm_session_list_init (GHashTable **sessnames, GList **sessions, ":", -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) |