Update to 3.1.2 OBS-URL: https://build.opensuse.org/request/show/73903 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=163
147 lines
6.2 KiB
Diff
147 lines
6.2 KiB
Diff
Index: gdm-3.1.2/common/gdm-settings-system-backend.c
|
|
===================================================================
|
|
--- gdm-3.1.2.orig/common/gdm-settings-system-backend.c
|
|
+++ gdm-3.1.2/common/gdm-settings-system-backend.c
|
|
@@ -44,11 +44,11 @@
|
|
#define SYSCONFIG_AUTOLOGIN_KEY "DISPLAYMANAGER_AUTOLOGIN"
|
|
#define SYSCONFIG_TCP_OPEN_KEY "DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN"
|
|
#define SYSCONFIG_XDMCP_KEY "DISPLAYMANAGER_REMOTE_ACCESS"
|
|
+#define SYSCONFIG_PASSWORDLESS_KEY "DISPLAYMANAGER_PASSWORD_LESS_LOGIN"
|
|
/* Keys from sysconfig that have no equivalent in GDM:
|
|
* - DISPLAYMANAGER_ROOT_LOGIN_REMOTE
|
|
* - DISPLAYMANAGER_STARTS_XSERVER (we always have a local display manager,
|
|
* see gdm_manager_constructor())
|
|
- * - DISPLAYMANAGER_PASSWORD_LESS_LOGIN
|
|
* - DISPLAYMANAGER_AD_INTEGRATION
|
|
* - DISPLAYMANAGER_SHUTDOWN (handled by ConsoleKit)
|
|
*/
|
|
@@ -66,12 +66,14 @@ struct GdmSettingsSystemBackendPrivate
|
|
gboolean dirty_autologin_user;
|
|
gboolean dirty_tcp_open;
|
|
gboolean dirty_xdmcp;
|
|
+ gboolean dirty_passwordless;
|
|
|
|
gchar *set_autologin_user;
|
|
gboolean set_autologin_enabled;
|
|
|
|
gboolean set_tcp_open;
|
|
gboolean set_xdmcp;
|
|
+ gboolean set_passwordless;
|
|
};
|
|
|
|
static void gdm_settings_system_backend_class_init (GdmSettingsSystemBackendClass *klass);
|
|
@@ -141,6 +143,16 @@ gdm_settings_system_backend_get_value (G
|
|
val = g_strdup (xdmcp ? "true" : "false");
|
|
}
|
|
}
|
|
+ } else if (!strcasecmp (key, GDM_KEY_SUSE_PASSWORDLESS_LOGIN_ENABLE)) {
|
|
+ if (priv->dirty_passwordless) {
|
|
+ val = g_strdup (priv->set_passwordless ? "true" : "false");
|
|
+ } else {
|
|
+ gboolean passwordless;
|
|
+
|
|
+ if (gdm_sysconfig_get_value_boolean ((const gchar **) priv->lines, SYSCONFIG_PASSWORDLESS_KEY, &passwordless)) {
|
|
+ val = g_strdup (passwordless ? "true" : "false");
|
|
+ }
|
|
+ }
|
|
} else {
|
|
g_set_error (error, GDM_SETTINGS_BACKEND_ERROR, GDM_SETTINGS_BACKEND_ERROR_KEY_NOT_FOUND, "Key not found");
|
|
goto out;
|
|
@@ -201,6 +213,12 @@ save_settings (GdmSettingsSystemBackend
|
|
backend->priv->set_xdmcp ? "yes" : "no");
|
|
}
|
|
|
|
+ if (backend->priv->dirty_passwordless) {
|
|
+ if (!gdm_sysconfig_set_value_boolean (backend->priv->lines, SYSCONFIG_PASSWORDLESS_KEY, backend->priv->set_passwordless))
|
|
+ g_warning ("Unable to set key %s to '%s'.", SYSCONFIG_PASSWORDLESS_KEY,
|
|
+ backend->priv->set_passwordless ? "yes" : "no");
|
|
+ }
|
|
+
|
|
if (!gdm_sysconfig_save_file (backend->priv->filename, backend->priv->lines))
|
|
g_warning ("Unable to save settings to %s.", backend->priv->filename);
|
|
|
|
@@ -209,6 +227,7 @@ save_settings (GdmSettingsSystemBackend
|
|
backend->priv->dirty_autologin_user = FALSE;
|
|
backend->priv->dirty_tcp_open = FALSE;
|
|
backend->priv->dirty_xdmcp = FALSE;
|
|
+ backend->priv->dirty_passwordless = FALSE;
|
|
}
|
|
|
|
static gboolean
|
|
@@ -276,6 +295,9 @@ gdm_settings_system_backend_set_value (G
|
|
} else if (!strcasecmp (key, GDM_KEY_XDMCP_ENABLE)) {
|
|
priv->set_xdmcp = value_to_boolean (value);
|
|
GDM_SETTINGS_SYSTEM_BACKEND (backend)->priv->dirty_xdmcp = TRUE;
|
|
+ } else if (!strcasecmp (key, GDM_KEY_SUSE_PASSWORDLESS_LOGIN_ENABLE)) {
|
|
+ priv->set_passwordless = value_to_boolean (value);
|
|
+ GDM_SETTINGS_SYSTEM_BACKEND (backend)->priv->dirty_passwordless = TRUE;
|
|
} else {
|
|
g_set_error (error, GDM_SETTINGS_BACKEND_ERROR, GDM_SETTINGS_BACKEND_ERROR_KEY_NOT_FOUND, "Key not found");
|
|
return FALSE;
|
|
Index: gdm-3.1.2/common/gdm-settings-keys.h
|
|
===================================================================
|
|
--- gdm-3.1.2.orig/common/gdm-settings-keys.h
|
|
+++ gdm-3.1.2/common/gdm-settings-keys.h
|
|
@@ -32,6 +32,7 @@ G_BEGIN_DECLS
|
|
#define GDM_KEY_TIMED_LOGIN_ENABLE "daemon/TimedLoginEnable"
|
|
#define GDM_KEY_TIMED_LOGIN_USER "daemon/TimedLogin"
|
|
#define GDM_KEY_TIMED_LOGIN_DELAY "daemon/TimedLoginDelay"
|
|
+#define GDM_KEY_SUSE_PASSWORDLESS_LOGIN_ENABLE "daemon/SUSEPasswordlessEnable"
|
|
|
|
#define GDM_KEY_DEBUG "debug/Enable"
|
|
|
|
Index: gdm-3.1.2/data/gdm.schemas.in.in
|
|
===================================================================
|
|
--- gdm-3.1.2.orig/data/gdm.schemas.in.in
|
|
+++ gdm-3.1.2/data/gdm.schemas.in.in
|
|
@@ -47,6 +47,12 @@
|
|
<signature>i</signature>
|
|
<default>30</default>
|
|
</schema>
|
|
+ <schema>
|
|
+ <!-- SUSE-specific -->
|
|
+ <key>daemon/SUSEPasswordlessEnable</key>
|
|
+ <signature>b</signature>
|
|
+ <default>false</default>
|
|
+ </schema>
|
|
|
|
<schema>
|
|
<key>debug/Enable</key>
|
|
Index: gdm-3.1.2/daemon/gdm-greeter-server.c
|
|
===================================================================
|
|
--- gdm-3.1.2.orig/daemon/gdm-greeter-server.c
|
|
+++ gdm-3.1.2/daemon/gdm-greeter-server.c
|
|
@@ -46,6 +46,9 @@
|
|
#include "gdm-common.h"
|
|
#include "gdm-greeter-server.h"
|
|
|
|
+#include "gdm-settings-client.h"
|
|
+#include "gdm-settings-keys.h"
|
|
+
|
|
#define GDM_GREETER_SERVER_DBUS_PATH "/org/gnome/DisplayManager/GreeterServer"
|
|
#define GDM_GREETER_SERVER_DBUS_INTERFACE "org.gnome.DisplayManager.GreeterServer"
|
|
|
|
@@ -478,6 +481,7 @@ handle_begin_verification_for_user (GdmG
|
|
DBusError error;
|
|
const char *text;
|
|
const char *service_name;
|
|
+ gboolean passwordless;
|
|
|
|
dbus_error_init (&error);
|
|
if (! dbus_message_get_args (message, &error,
|
|
@@ -488,6 +492,14 @@ handle_begin_verification_for_user (GdmG
|
|
}
|
|
dbus_error_free (&error);
|
|
|
|
+ if (!gdm_settings_client_get_boolean (GDM_KEY_SUSE_PASSWORDLESS_LOGIN_ENABLE,
|
|
+ &passwordless)) {
|
|
+ passwordless = FALSE;
|
|
+ }
|
|
+
|
|
+ if (passwordless)
|
|
+ service_name = "gdm-autologin";
|
|
+
|
|
g_debug ("GreeterServer: BeginVerificationForUser for '%s'", text);
|
|
|
|
reply = dbus_message_new_method_return (message);
|