Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Update
gdm
gdm-desktop-session-env-pam.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gdm-desktop-session-env-pam.patch of Package gdm
Index: gdm-3.11.92.1/daemon/gdm-session-worker.c =================================================================== --- gdm-3.11.92.1.orig/daemon/gdm-session-worker.c +++ gdm-3.11.92.1/daemon/gdm-session-worker.c @@ -179,6 +179,8 @@ struct GdmSessionWorkerPrivate GdmSessionSettings *user_settings; GDBusMethodInvocation *pending_invocation; + + char *suse_session_name; }; enum { @@ -1144,6 +1146,9 @@ gdm_session_worker_initialize_pam (GdmSe gdm_session_worker_set_environment_variable (worker, "XDG_SESSION_CLASS", "greeter"); } + 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; @@ -2286,6 +2291,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); @@ -2293,6 +2304,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) @@ -3098,6 +3127,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_session_display_mode = gdm_session_worker_handle_set_session_display_mode; interface->handle_set_environment_variable = gdm_session_worker_handle_set_environment_variable; @@ -3211,6 +3241,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.11.92.1/daemon/gdm-session-worker.xml =================================================================== --- gdm-3.11.92.1.orig/daemon/gdm-session-worker.xml +++ gdm-3.11.92.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.11.92.1/daemon/gdm-session.c =================================================================== --- gdm-3.11.92.1.orig/daemon/gdm-session.c +++ gdm-3.11.92.1/daemon/gdm-session.c @@ -164,6 +164,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) @@ -616,6 +618,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, @@ -623,6 +628,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 @@ -931,6 +949,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); @@ -938,6 +960,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