[gdm] xdmcp: Allow timed/autologin on remote displays



commit 9ea772c04bc58e457e99d9bdfb458318189226c0
Author: Mario Izquierdo Rodríguez <mariodebian gmail com>
Date:   Wed Aug 20 11:03:26 2014 -0400

    xdmcp: Allow timed/autologin on remote displays
    
    This commit readds the  security/AllowRemoteAutoLogin key
    (deprecated in >= 2.20) and so XDMCP setups can be configured to use
    autologin and timedlogin.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=624958

 common/gdm-settings-keys.h |    1 +
 daemon/gdm-xdmcp-display.c |   12 ++++++++++++
 data/gdm.schemas.in.in     |    5 +++++
 3 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/common/gdm-settings-keys.h b/common/gdm-settings-keys.h
index f4dcca2..fd2c64e 100644
--- a/common/gdm-settings-keys.h
+++ b/common/gdm-settings-keys.h
@@ -41,6 +41,7 @@ G_BEGIN_DECLS
 #define GDM_KEY_INCLUDE_ALL "greeter/IncludeAll"
 
 #define GDM_KEY_DISALLOW_TCP "security/DisallowTCP"
+#define GDM_KEY_ALLOW_REMOTE_AUTOLOGIN "security/AllowRemoteAutoLogin"
 
 #define GDM_KEY_XDMCP_ENABLE "xdmcp/Enable"
 #define GDM_KEY_SHOW_LOCAL_GREETER "xdmcp/ShowLocalGreeter"
diff --git a/daemon/gdm-xdmcp-display.c b/daemon/gdm-xdmcp-display.c
index a57840e..41dd087 100644
--- a/daemon/gdm-xdmcp-display.c
+++ b/daemon/gdm-xdmcp-display.c
@@ -41,6 +41,10 @@
 #include "gdm-common.h"
 #include "gdm-address.h"
 
+#include "gdm-settings.h"
+#include "gdm-settings-direct.h"
+#include "gdm-settings-keys.h"
+
 #define GDM_XDMCP_DISPLAY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_XDMCP_DISPLAY, 
GdmXdmcpDisplayPrivate))
 
 struct GdmXdmcpDisplayPrivate
@@ -190,6 +194,14 @@ gdm_xdmcp_display_get_timed_login_details (GdmDisplay *display,
         *enabledp = FALSE;
         *usernamep = g_strdup ("");
         *delayp = 0;
+        gboolean allow_remote_autologin;
+
+        allow_remote_autologin = FALSE;
+        gdm_settings_direct_get_boolean (GDM_KEY_ALLOW_REMOTE_AUTOLOGIN, &allow_remote_autologin);
+
+        if ( allow_remote_autologin ) {
+                GDM_DISPLAY_CLASS (gdm_xdmcp_display_parent_class)->get_timed_login_details (display, 
enabledp, usernamep, delayp);
+        }
 }
 
 static void
diff --git a/data/gdm.schemas.in.in b/data/gdm.schemas.in.in
index 4278b06..4320b71 100644
--- a/data/gdm.schemas.in.in
+++ b/data/gdm.schemas.in.in
@@ -52,6 +52,11 @@
       <signature>b</signature>
       <default>true</default>
     </schema>
+    <schema>
+      <key>security/AllowRemoteAutoLogin</key>
+      <signature>b</signature>
+      <default>false</default>
+    </schema>
 
     <schema>
       <key>debug/Enable</key>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]