Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
gdm.2185
gdm-desktop-session-env-pam.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gdm-desktop-session-env-pam.patch of Package gdm.2185
Index: gdm-3.10.0.1/daemon/gdm-session-worker.c =================================================================== --- gdm-3.10.0.1.orig/daemon/gdm-session-worker.c +++ gdm-3.10.0.1/daemon/gdm-session-worker.c @@ -171,6 +171,8 @@ struct GdmSessionWorkerPrivate GdmSessionSettings *user_settings; GDBusMethodInvocation *pending_invocation; + + char *suse_session_name; }; enum { @@ -1165,6 +1167,9 @@ gdm_session_worker_initialize_pam (GdmSe g_free (pam_xauth); #endif + if (worker->priv->suse_session_name) + gdm_session_worker_set_environment_variable (worker, "DESKTOP_SESSION", worker->priv->suse_session_name); + g_debug ("GdmSessionWorker: state SETUP_COMPLETE"); worker->priv->state = GDM_SESSION_WORKER_STATE_SETUP_COMPLETE; @@ -2110,6 +2115,12 @@ gdm_session_worker_handle_set_session_na { GdmSessionWorker *worker = GDM_SESSION_WORKER (object); g_debug ("GdmSessionWorker: session name set to %s", session_name); + + if (worker->priv->pam_handle != NULL) + gdm_session_worker_set_environment_variable (worker, "DESKTOP_SESSION", session_name); + g_free (worker->priv->suse_session_name); + worker->priv->suse_session_name = g_strdup (session_name); + gdm_session_settings_set_session_name (worker->priv->user_settings, session_name); gdm_dbus_worker_complete_set_session_name (object, invocation); @@ -2117,6 +2128,24 @@ gdm_session_worker_handle_set_session_na } static gboolean +gdm_session_worker_handle_set_default_session_name (GdmDBusWorker *object, + GDBusMethodInvocation *invocation, + const char *session_name) +{ + GdmSessionWorker *worker = GDM_SESSION_WORKER (object); + g_debug ("GdmSessionWorker: default session name set to %s", session_name); + + if (worker->priv->pam_handle != NULL) + gdm_session_worker_set_environment_variable (worker, "DESKTOP_SESSION", session_name); + g_free (worker->priv->suse_session_name); + worker->priv->suse_session_name = g_strdup (session_name); + + gdm_dbus_worker_complete_set_default_session_name (object, invocation); + return TRUE; +} + + +static gboolean gdm_session_worker_handle_set_session_type (GdmDBusWorker *object, GDBusMethodInvocation *invocation, const char *session_type) @@ -2911,6 +2940,7 @@ worker_interface_init (GdmDBusWorkerIfac interface->handle_open = gdm_session_worker_handle_open; interface->handle_set_language_name = gdm_session_worker_handle_set_language_name; interface->handle_set_session_name = gdm_session_worker_handle_set_session_name; + interface->handle_set_default_session_name = gdm_session_worker_handle_set_default_session_name; interface->handle_set_session_type = gdm_session_worker_handle_set_session_type; interface->handle_set_environment_variable = gdm_session_worker_handle_set_environment_variable; interface->handle_start_program = gdm_session_worker_handle_start_program; @@ -3023,6 +3053,8 @@ gdm_session_worker_finalize (GObject *ob g_hash_table_unref (worker->priv->reauthentication_requests); + g_free (worker->priv->suse_session_name); + G_OBJECT_CLASS (gdm_session_worker_parent_class)->finalize (object); } Index: gdm-3.10.0.1/daemon/gdm-session-worker.xml =================================================================== --- gdm-3.10.0.1.orig/daemon/gdm-session-worker.xml +++ gdm-3.10.0.1/daemon/gdm-session-worker.xml @@ -13,6 +13,9 @@ <method name="SetSessionName"> <arg name="session_name" direction="in" type="s" /> </method> + <method name="SetDefaultSessionName"> + <arg name="default_session_name" direction="in" type="s"/> + </method> <method name="SetSessionType"> <arg name="session_type" direction="in" type="s"/> </method> Index: gdm-3.10.0.1/daemon/gdm-session.c =================================================================== --- gdm-3.10.0.1.orig/daemon/gdm-session.c +++ gdm-3.10.0.1/daemon/gdm-session.c @@ -170,6 +170,8 @@ G_DEFINE_TYPE (GdmSession, gdm_session, G_TYPE_OBJECT); +static const char *get_session_name (GdmSession *self); + static GdmSessionConversation * find_conversation_by_name (GdmSession *self, const char *service_name) @@ -614,6 +616,9 @@ get_default_session_name (GdmSession *se static void gdm_session_defaults_changed (GdmSession *self) { + GHashTableIter iter; + gpointer key, value; + const char *text; if (self->priv->greeter_interface != NULL) { gdm_dbus_greeter_emit_default_language_name_changed (self->priv->greeter_interface, @@ -621,6 +626,19 @@ gdm_session_defaults_changed (GdmSession gdm_dbus_greeter_emit_default_session_name_changed (self->priv->greeter_interface, get_default_session_name (self)); } + + text = get_session_name (self); + + g_hash_table_iter_init (&iter, self->priv->conversations); + while (g_hash_table_iter_next (&iter, &key, &value)) { + GdmSessionConversation *conversation; + + conversation = (GdmSessionConversation *) value; + + gdm_dbus_worker_call_set_default_session_name (conversation->worker_proxy, + text, + NULL, NULL, NULL); + } } void @@ -929,6 +947,10 @@ worker_on_saved_session_name_read (GdmDB if (strcmp (session_name, get_default_session_name (self)) != 0) { + GHashTableIter iter; + gpointer key, value; + const char *text; + g_free (self->priv->saved_session); self->priv->saved_session = g_strdup (session_name); @@ -936,6 +958,19 @@ worker_on_saved_session_name_read (GdmDB gdm_dbus_greeter_emit_default_session_name_changed (self->priv->greeter_interface, session_name); } + + text = get_session_name (self); + + g_hash_table_iter_init (&iter, self->priv->conversations); + while (g_hash_table_iter_next (&iter, &key, &value)) { + GdmSessionConversation *conversation; + + conversation = (GdmSessionConversation *) value; + + gdm_dbus_worker_call_set_default_session_name (conversation->worker_proxy, + text, + NULL, NULL, NULL); + } } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor