summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2012-10-01 17:52:33 -0400
committerRay Strode <rstrode@redhat.com>2012-10-01 17:52:33 -0400
commit189cd818bf1592b5b8607793575bcf4e71ba8008 (patch)
tree4baf0906f2fd1118476729d69ab846bb04a01451
parent01c334ed94b64a3b2e9119e95e968db24dac5a31 (diff)
downloadgdm-189cd818bf1592b5b8607793575bcf4e71ba8008.tar.gz
slave: let initial-setup have access to its display
Ideally, we would only grant access to the initial-setup user when launching initial-setup, but this should be okay for now.
-rw-r--r--daemon/gdm-slave.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index 7bbe8312..f011207b 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -545,11 +545,15 @@ gdm_slave_setup_xhost_auth (XHostAddress *host_entries, XServerInterpretedAddres
si_entries[0].typelength = strlen ("localuser");
si_entries[1].type = "localuser";
si_entries[1].typelength = strlen ("localuser");
+ si_entries[2].type = "localuser";
+ si_entries[2].typelength = strlen ("localuser");
si_entries[0].value = "root";
si_entries[0].valuelength = strlen ("root");
si_entries[1].value = GDM_USERNAME;
si_entries[1].valuelength = strlen (GDM_USERNAME);
+ si_entries[2].value = "gnome-initial-setup";
+ si_entries[2].valuelength = strlen ("gnome-initial-setup");
host_entries[0].family = FamilyServerInterpreted;
host_entries[0].address = (char *) &si_entries[0];
@@ -557,6 +561,9 @@ gdm_slave_setup_xhost_auth (XHostAddress *host_entries, XServerInterpretedAddres
host_entries[1].family = FamilyServerInterpreted;
host_entries[1].address = (char *) &si_entries[1];
host_entries[1].length = sizeof (XServerInterpretedAddress);
+ host_entries[2].family = FamilyServerInterpreted;
+ host_entries[2].address = (char *) &si_entries[2];
+ host_entries[2].length = sizeof (XServerInterpretedAddress);
}
static void
@@ -672,8 +679,8 @@ gdm_slave_connect_to_x11_display (GdmSlave *slave)
g_warning ("Unable to connect to display %s", slave->priv->display_name);
ret = FALSE;
} else if (slave->priv->display_is_local) {
- XServerInterpretedAddress si_entries[2];
- XHostAddress host_entries[2];
+ XServerInterpretedAddress si_entries[3];
+ XHostAddress host_entries[3];
g_debug ("GdmSlave: Connected to display %s", slave->priv->display_name);
ret = TRUE;
@@ -909,8 +916,8 @@ gdm_slave_add_user_authorization (GdmSlave *slave,
const char *username,
char **filenamep)
{
- XServerInterpretedAddress si_entries[2];
- XHostAddress host_entries[2];
+ XServerInterpretedAddress si_entries[3];
+ XHostAddress host_entries[3];
gboolean res;
GError *error;
char *filename;