summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Izquierdo Rodríguez <mariodebian@gmail.com>2014-08-20 11:03:26 -0400
committerRay Strode <rstrode@redhat.com>2014-08-20 11:07:34 -0400
commit9ea772c04bc58e457e99d9bdfb458318189226c0 (patch)
tree883834f540fcef359620201b5a06ffceeae40eb2
parent63a13be597e90085916b17fafa1ab542f12e63b7 (diff)
downloadgdm-9ea772c04bc58e457e99d9bdfb458318189226c0.tar.gz
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
-rw-r--r--common/gdm-settings-keys.h1
-rw-r--r--daemon/gdm-xdmcp-display.c12
-rw-r--r--data/gdm.schemas.in.in5
3 files changed, 18 insertions, 0 deletions
diff --git a/common/gdm-settings-keys.h b/common/gdm-settings-keys.h
index f4dcca2e..fd2c64e0 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 a57840e7..41dd087f 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 4278b06d..4320b716 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>