[gdm] daemon: Allow passing a username to SetupForProgram
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] daemon: Allow passing a username to SetupForProgram
- Date: Thu, 19 Jul 2012 16:19:38 +0000 (UTC)
commit 5250690b7a5582a04b79611016171a872e215a52
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Jul 17 13:20:26 2012 -0400
daemon: Allow passing a username to SetupForProgram
This allows the setup session to pass the gdm-initial-setup user.
https://bugzilla.gnome.org/show_bug.cgi?id=678057
daemon/gdm-session-worker.c | 3 ++-
daemon/gdm-session.c | 5 ++++-
daemon/gdm-session.h | 1 +
daemon/gdm-session.xml | 1 +
daemon/gdm-welcome-session.c | 5 ++++-
5 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 190ca4f..90911d1 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -2686,6 +2686,7 @@ on_setup_for_user (GdmDBusWorkerManager *proxy,
static void
on_setup_for_program (GdmDBusWorkerManager *proxy,
const char *service,
+ const char *username,
const char *x11_display_name,
const char *x11_authority_file,
const char *console,
@@ -2707,7 +2708,7 @@ on_setup_for_program (GdmDBusWorkerManager *proxy,
worker->priv->display_seat_id = g_strdup (seat_id);
worker->priv->hostname = g_strdup (hostname);
worker->priv->display_is_local = display_is_local;
- worker->priv->username = g_strdup (GDM_USERNAME);
+ worker->priv->username = g_strdup (username);
worker->priv->log_file = g_strdup (log_file);
worker->priv->is_program_session = TRUE;
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index d94c5e4..4a03add 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2161,6 +2161,7 @@ send_setup_for_user (GdmSession *self,
static void
send_setup_for_program (GdmSession *self,
const char *service_name,
+ const char *username,
const char *log_file)
{
const char *display_name;
@@ -2204,6 +2205,7 @@ send_setup_for_program (GdmSession *self,
if (conversation != NULL) {
gdm_dbus_worker_manager_emit_setup_for_program (conversation->worker_manager_interface,
service_name,
+ username,
display_name,
display_x11_authority_file,
display_device,
@@ -2244,12 +2246,13 @@ gdm_session_setup_for_user (GdmSession *self,
void
gdm_session_setup_for_program (GdmSession *self,
const char *service_name,
+ const char *username,
const char *log_file)
{
g_return_if_fail (GDM_IS_SESSION (self));
- send_setup_for_program (self, service_name, log_file);
+ send_setup_for_program (self, service_name, username, log_file);
}
void
diff --git a/daemon/gdm-session.h b/daemon/gdm-session.h
index 3a1d0fd..90bab21 100644
--- a/daemon/gdm-session.h
+++ b/daemon/gdm-session.h
@@ -121,6 +121,7 @@ void gdm_session_setup_for_user (GdmSession *session,
const char *username);
void gdm_session_setup_for_program (GdmSession *session,
const char *service_name,
+ const char *username,
const char *log_file);
void gdm_session_set_environment_variable (GdmSession *session,
const char *key,
diff --git a/daemon/gdm-session.xml b/daemon/gdm-session.xml
index 15f83f9..e986483 100644
--- a/daemon/gdm-session.xml
+++ b/daemon/gdm-session.xml
@@ -127,6 +127,7 @@
</signal>
<signal name="SetupForProgram">
<arg name="service_name" type="s"/>
+ <arg name="user_name" type="s"/>
<arg name="x11_display_name" type="s"/>
<arg name="x11_authority_file" type="s"/>
<arg name="display_device" type="s"/>
diff --git a/daemon/gdm-welcome-session.c b/daemon/gdm-welcome-session.c
index 3f3cd66..9a3c81d 100644
--- a/daemon/gdm-welcome-session.c
+++ b/daemon/gdm-welcome-session.c
@@ -748,7 +748,10 @@ on_conversation_started (GdmSession *session,
log_path = g_build_filename (LOGDIR, log_file, NULL);
g_free (log_file);
- gdm_session_setup_for_program (welcome_session->priv->session, "gdm-welcome", log_path);
+ gdm_session_setup_for_program (welcome_session->priv->session,
+ "gdm-welcome",
+ welcome_session->priv->user_name,
+ log_path);
g_free (log_path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]