Blob Blame Raw
diff -up gdm-2.22.0/common/gdm-settings-keys.h.enable-tcp gdm-2.22.0/common/gdm-settings-keys.h
--- gdm-2.22.0/common/gdm-settings-keys.h.enable-tcp	2008-04-17 23:29:27.000000000 -0400
+++ gdm-2.22.0/common/gdm-settings-keys.h	2008-06-25 11:19:51.000000000 -0400
@@ -31,6 +31,8 @@ G_BEGIN_DECLS
 #define GDM_KEY_TIMED_LOGIN_USER "daemon/TimedLogin"
 #define GDM_KEY_TIMED_LOGIN_DELAY "daemon/TimedLoginDelay"
 
+#define GDM_KEY_DISALLOW_TCP "security/DisallowTCP"
+
 #define GDM_KEY_XDMCP_ENABLE "xdmcp/Enable"
 #define GDM_KEY_MAX_PENDING "xdmcp/MaxPending"
 #define GDM_KEY_MAX_SESSIONS "xdmcp/MaxSessions"
diff -up gdm-2.22.0/daemon/gdm-simple-slave.c.enable-tcp gdm-2.22.0/daemon/gdm-simple-slave.c
--- gdm-2.22.0/daemon/gdm-simple-slave.c.enable-tcp	2008-06-25 11:19:51.000000000 -0400
+++ gdm-2.22.0/daemon/gdm-simple-slave.c	2008-06-25 11:29:44.000000000 -0400
@@ -1003,8 +1003,18 @@ gdm_simple_slave_run (GdmSimpleSlave *sl
          * exist */
         if (display_is_local) {
                 gboolean res;
+                gboolean disable_tcp;
 
                 slave->priv->server = gdm_server_new (display_name, auth_file);
+
+                disable_tcp = TRUE;
+                if (gdm_settings_client_get_boolean (GDM_KEY_DISALLOW_TCP,
+                                                     &disable_tcp)) {
+                        g_object_set (slave->priv->server,
+                                      "disable-tcp", disable_tcp,
+                                      NULL);
+                }
+
                 g_signal_connect (slave->priv->server,
                                   "exited",
                                   G_CALLBACK (on_server_exited),
diff -up gdm-2.22.0/data/gdm.conf-custom.in.enable-tcp gdm-2.22.0/data/gdm.conf-custom.in
--- gdm-2.22.0/data/gdm.conf-custom.in.enable-tcp	2008-04-17 23:29:29.000000000 -0400
+++ gdm-2.22.0/data/gdm.conf-custom.in	2008-06-25 11:19:51.000000000 -0400
@@ -4,4 +4,6 @@
 
 [chooser]
 
+[security]
+
 [debug]
diff -up gdm-2.22.0/data/gdm.schemas.in.enable-tcp gdm-2.22.0/data/gdm.schemas.in
--- gdm-2.22.0/data/gdm.schemas.in.enable-tcp	2008-04-20 09:51:56.000000000 -0400
+++ gdm-2.22.0/data/gdm.schemas.in	2008-06-25 11:19:51.000000000 -0400
@@ -28,6 +28,12 @@
     </schema>
 
     <schema>
+      <key>security/DisallowTCP</key>
+      <signature>b</signature>
+      <default>true</default>
+    </schema>
+
+    <schema>
       <key>xdmcp/Enable</key>
       <signature>b</signature>
       <default>false</default>