gdm r5674 - in trunk: . daemon
- From: halfline svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r5674 - in trunk: . daemon
- Date: Fri, 1 Feb 2008 20:22:40 +0000 (GMT)
Author: halfline
Date: Fri Feb 1 20:22:40 2008
New Revision: 5674
URL: http://svn.gnome.org/viewvc/gdm?rev=5674&view=rev
Log:
2008-02-01 Ray Strode <rstrode redhat com>
Patch from Eamon Walsh <ewalsh tycho nsa gov> to
pass path of authority file to pam code so that it
can be given to PAM at a later time.
* daemon/test-session.c (main):
* daemon/gdm-product-slave.c (create_new_session):
* daemon/gdm-simple-slave.c (create_new_session):
grab authority file and pass to session direct
object
* daemon/gdm-session-worker.c (do_setup),
(on_setup_for_user):,
stash away location for authority file
* daemon/gdm-session-direct.c (do_introspect),
(send_setup), (send_setup_for_user):
add authority file to dbus interface
(_gdm_session_direct_set_display_x11_authority_file):
(gdm_session_direct_new):
stash away location for authority file
Modified:
trunk/ChangeLog
trunk/daemon/gdm-product-slave.c
trunk/daemon/gdm-session-direct.c
trunk/daemon/gdm-session-direct.h
trunk/daemon/gdm-session-worker.c
trunk/daemon/gdm-simple-slave.c
trunk/daemon/test-session.c
Modified: trunk/daemon/gdm-product-slave.c
==============================================================================
--- trunk/daemon/gdm-product-slave.c (original)
+++ trunk/daemon/gdm-product-slave.c Fri Feb 1 20:22:40 2008
@@ -674,6 +674,7 @@
char *display_name;
char *display_hostname;
char *display_device;
+ char *display_x11_authority_file;
g_debug ("GdmProductSlave: Creating new session");
@@ -681,6 +682,7 @@
"display-name", &display_name,
"display-hostname", &display_hostname,
"display-is-local", &display_is_local,
+ "display-x11-authority-file", &display_x11_authority_file,
NULL);
/* FIXME: we don't yet have a display device! */
@@ -689,6 +691,7 @@
slave->priv->session = gdm_session_direct_new (display_name,
display_hostname,
display_device,
+ display_x11_authority_file,
display_is_local);
g_free (display_name);
g_free (display_hostname);
Modified: trunk/daemon/gdm-session-direct.c
==============================================================================
--- trunk/daemon/gdm-session-direct.c (original)
+++ trunk/daemon/gdm-session-direct.c Fri Feb 1 20:22:40 2008
@@ -82,6 +82,7 @@
char *display_name;
char *display_hostname;
char *display_device;
+ char *display_x11_authority_file;
gboolean display_is_local;
DBusServer *server;
@@ -95,6 +96,7 @@
PROP_DISPLAY_HOSTNAME,
PROP_DISPLAY_IS_LOCAL,
PROP_DISPLAY_DEVICE,
+ PROP_DISPLAY_X11_AUTHORITY_FILE,
PROP_USER_X11_AUTHORITY_FILE,
};
@@ -909,12 +911,14 @@
" <arg name=\"x11_display_name\" type=\"s\"/>\n"
" <arg name=\"display_device\" type=\"s\"/>\n"
" <arg name=\"hostname\" type=\"s\"/>\n"
+ " <arg name=\"x11_authority_file\" type=\"s\"/>\n"
" </signal>\n"
" <signal name=\"SetupForUser\">\n"
" <arg name=\"service_name\" type=\"s\"/>\n"
" <arg name=\"x11_display_name\" type=\"s\"/>\n"
" <arg name=\"display_device\" type=\"s\"/>\n"
" <arg name=\"hostname\" type=\"s\"/>\n"
+ " <arg name=\"x11_authority_file\" type=\"s\"/>\n"
" <arg name=\"username\" type=\"s\"/>\n"
" </signal>\n"
" <signal name=\"Authenticate\">\n"
@@ -1292,6 +1296,7 @@
const char *display_name;
const char *display_device;
const char *display_hostname;
+ const char *display_x11_authority_file;
if (session->priv->display_name != NULL) {
display_name = session->priv->display_name;
@@ -1308,6 +1313,11 @@
} else {
display_device = "";
}
+ if (session->priv->display_x11_authority_file != NULL) {
+ display_x11_authority_file = session->priv->display_x11_authority_file;
+ } else {
+ display_x11_authority_file = "";
+ }
g_debug ("GdmSessionDirect: Beginning setup");
@@ -1320,6 +1330,7 @@
dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_name);
dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_device);
dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_hostname);
+ dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_x11_authority_file);
if (! send_dbus_message (session->priv->worker_connection, message)) {
g_debug ("GdmSessionDirect: Could not send %s signal", "Setup");
@@ -1336,6 +1347,7 @@
const char *display_name;
const char *display_device;
const char *display_hostname;
+ const char *display_x11_authority_file;
const char *selected_user;
if (session->priv->display_name != NULL) {
@@ -1353,6 +1365,11 @@
} else {
display_device = "";
}
+ if (session->priv->display_x11_authority_file != NULL) {
+ display_x11_authority_file = session->priv->display_x11_authority_file;
+ } else {
+ display_x11_authority_file = "";
+ }
if (session->priv->selected_user != NULL) {
selected_user = session->priv->selected_user;
} else {
@@ -1370,6 +1387,7 @@
dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_name);
dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_device);
dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_hostname);
+ dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_x11_authority_file);
dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &selected_user);
if (! send_dbus_message (session->priv->worker_connection, message)) {
@@ -1885,6 +1903,14 @@
}
static void
+_gdm_session_direct_set_display_x11_authority_file (GdmSessionDirect *session,
+ const char *name)
+{
+ g_free (session->priv->display_x11_authority_file);
+ session->priv->display_x11_authority_file = g_strdup (name);
+}
+
+static void
_gdm_session_direct_set_display_is_local (GdmSessionDirect *session,
gboolean is)
{
@@ -1914,6 +1940,9 @@
case PROP_USER_X11_AUTHORITY_FILE:
_gdm_session_direct_set_user_x11_authority_file (self, g_value_get_string (value));
break;
+ case PROP_DISPLAY_X11_AUTHORITY_FILE:
+ _gdm_session_direct_set_display_x11_authority_file (self, g_value_get_string (value));
+ break;
case PROP_DISPLAY_IS_LOCAL:
_gdm_session_direct_set_display_is_local (self, g_value_get_boolean (value));
break;
@@ -1946,6 +1975,9 @@
case PROP_USER_X11_AUTHORITY_FILE:
g_value_set_string (value, self->priv->user_x11_authority_file);
break;
+ case PROP_DISPLAY_X11_AUTHORITY_FILE:
+ g_value_set_string (value, self->priv->display_x11_authority_file);
+ break;
case PROP_DISPLAY_IS_LOCAL:
g_value_set_boolean (value, self->priv->display_is_local);
break;
@@ -1978,6 +2010,9 @@
g_free (session->priv->display_device);
session->priv->display_device = NULL;
+ g_free (session->priv->display_x11_authority_file);
+ session->priv->display_x11_authority_file = NULL;
+
g_free (session->priv->server_address);
session->priv->server_address = NULL;
@@ -2065,6 +2100,13 @@
"display is local",
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (object_class,
+ PROP_DISPLAY_X11_AUTHORITY_FILE,
+ g_param_spec_string ("display-x11-authority-file",
+ "display x11 authority file",
+ "display x11 authority file",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
/* not construct only */
g_object_class_install_property (object_class,
PROP_USER_X11_AUTHORITY_FILE,
@@ -2088,6 +2130,7 @@
gdm_session_direct_new (const char *display_name,
const char *display_hostname,
const char *display_device,
+ const char *display_x11_authority_file,
gboolean display_is_local)
{
GdmSessionDirect *session;
@@ -2096,6 +2139,7 @@
"display-name", display_name,
"display-hostname", display_hostname,
"display-device", display_device,
+ "display-x11-authority-file", display_x11_authority_file,
"display-is-local", display_is_local,
NULL);
Modified: trunk/daemon/gdm-session-direct.h
==============================================================================
--- trunk/daemon/gdm-session-direct.h (original)
+++ trunk/daemon/gdm-session-direct.h Fri Feb 1 20:22:40 2008
@@ -51,6 +51,7 @@
GdmSessionDirect * gdm_session_direct_new (const char *display_name,
const char *display_hostname,
const char *display_device,
+ const char *display_x11_authority_file,
gboolean display_is_local) G_GNUC_MALLOC;
char * gdm_session_direct_get_username (GdmSessionDirect *session_direct);
Modified: trunk/daemon/gdm-session-worker.c
==============================================================================
--- trunk/daemon/gdm-session-worker.c (original)
+++ trunk/daemon/gdm-session-worker.c Fri Feb 1 20:22:40 2008
@@ -94,6 +94,7 @@
/* from Setup */
char *service;
char *x11_display_name;
+ char *x11_authority_file;
char *display_device;
char *hostname;
char *username;
@@ -811,6 +812,7 @@
const char *username,
const char *hostname,
const char *x11_display_name,
+ const char *x11_authority_file,
const char *display_device,
GError **error)
{
@@ -1530,6 +1532,7 @@
worker->priv->username,
worker->priv->hostname,
worker->priv->x11_display_name,
+ worker->priv->x11_authority_file,
worker->priv->display_device,
&error);
if (! res) {
@@ -1787,6 +1790,7 @@
DBusError error;
const char *service;
const char *x11_display_name;
+ const char *x11_authority_file;
const char *console;
const char *hostname;
dbus_bool_t res;
@@ -1800,10 +1804,12 @@
DBUS_TYPE_STRING, &x11_display_name,
DBUS_TYPE_STRING, &console,
DBUS_TYPE_STRING, &hostname,
+ DBUS_TYPE_STRING, &x11_authority_file,
DBUS_TYPE_INVALID);
if (res) {
worker->priv->service = g_strdup (service);
worker->priv->x11_display_name = g_strdup (x11_display_name);
+ worker->priv->x11_authority_file = g_strdup (x11_authority_file);
worker->priv->display_device = g_strdup (console);
worker->priv->hostname = g_strdup (hostname);
worker->priv->username = NULL;
@@ -1823,6 +1829,7 @@
DBusError error;
const char *service;
const char *x11_display_name;
+ const char *x11_authority_file;
const char *console;
const char *hostname;
const char *username;
@@ -1837,11 +1844,13 @@
DBUS_TYPE_STRING, &x11_display_name,
DBUS_TYPE_STRING, &console,
DBUS_TYPE_STRING, &hostname,
+ DBUS_TYPE_STRING, &x11_authority_file,
DBUS_TYPE_STRING, &username,
DBUS_TYPE_INVALID);
if (res) {
worker->priv->service = g_strdup (service);
worker->priv->x11_display_name = g_strdup (x11_display_name);
+ worker->priv->x11_authority_file = g_strdup (x11_authority_file);
worker->priv->display_device = g_strdup (console);
worker->priv->hostname = g_strdup (hostname);
worker->priv->username = g_strdup (username);
Modified: trunk/daemon/gdm-simple-slave.c
==============================================================================
--- trunk/daemon/gdm-simple-slave.c (original)
+++ trunk/daemon/gdm-simple-slave.c Fri Feb 1 20:22:40 2008
@@ -381,6 +381,7 @@
char *display_name;
char *display_hostname;
char *display_device;
+ char *display_x11_authority_file;
g_debug ("GdmSimpleSlave: Creating new session");
@@ -388,6 +389,7 @@
"display-name", &display_name,
"display-hostname", &display_hostname,
"display-is-local", &display_is_local,
+ "display-x11-authority-file", &display_x11_authority_file,
NULL);
display_device = NULL;
@@ -398,6 +400,7 @@
slave->priv->session = gdm_session_direct_new (display_name,
display_hostname,
display_device,
+ display_x11_authority_file,
display_is_local);
g_free (display_name);
g_free (display_device);
Modified: trunk/daemon/test-session.c
==============================================================================
--- trunk/daemon/test-session.c (original)
+++ trunk/daemon/test-session.c Fri Feb 1 20:22:40 2008
@@ -248,6 +248,7 @@
session = gdm_session_direct_new (":0",
g_get_host_name (),
ttyname (STDIN_FILENO),
+ getenv("XAUTHORITY"),
TRUE);
g_debug ("GdmSessionDirect object created successfully");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]