diff options
author | Ray Strode <rstrode@redhat.com> | 2011-09-18 22:37:30 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2011-09-18 23:13:46 -0400 |
commit | 95d2c142053f1703baecc71f85f2b9871b4b321a (patch) | |
tree | d8037d9046424c34d82a0e17c3da5547e756c8ca | |
parent | 93347e5b0f36eb85a82ccc5f0a348b75bc5dfd27 (diff) | |
download | gdm-95d2c142053f1703baecc71f85f2b9871b4b321a.tar.gz |
data: move extension settings to common code
The shell greeter needs to be able to disable fingerprint
authentication, just as the fallback greeter does. This
commit moves that setting (and its cousin for smartcards)
to a central location.
https://bugzilla.gnome.org/show_bug.cgi?id=657823
8 files changed, 38 insertions, 36 deletions
diff --git a/data/Makefile.am b/data/Makefile.am index 8036f790..937d922f 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -40,6 +40,10 @@ dbusconf_in_files = gdm.conf.in dbusconf_DATA = $(dbusconf_in_files:.conf.in=.conf) @INTLTOOL_SCHEMAS_RULE@ +@INTLTOOL_XML_NOMERGE_RULE@ + +gsettings_SCHEMAS = org.gnome.login-screen.gschema.xml +@GSETTINGS_RULES@ schemasdir = $(pkgdatadir) schemas_in_files = gdm.schemas.in @@ -105,6 +109,7 @@ EXTRA_DIST = \ gdm-shell.session.in \ make-dconf-override-db.sh \ dconf-profile \ + org.gnome.login-screen.gschema.xml.in \ $(NULL) CLEANFILES = \ @@ -114,6 +119,7 @@ CLEANFILES = \ PreSession \ PostSession \ dconf-override-db \ + $(gsettings_SCHEMAS) \ $(NULL) DISTCLEANFILES = \ diff --git a/data/org.gnome.login-screen.gschema.xml.in b/data/org.gnome.login-screen.gschema.xml.in new file mode 100644 index 00000000..0f2c0d8f --- /dev/null +++ b/data/org.gnome.login-screen.gschema.xml.in @@ -0,0 +1,24 @@ +<schemalist> + <schema id="org.gnome.login-screen" path="/org/gnome/login-screen/"> + <key name="enable-fingerprint-authentication" type="b"> + <default>true</default> + <_summary> + Whether or not to allow fingerprint readers for login + </_summary> + <_description> + The login screen can optionally allow users who have enrolled + their fingerprints to log in using those prints. + </_description> + </key> + <key name="enable-smartcard-authentication" type="b"> + <default>false</default> + <_summary> + Whether or not to allow smartcard readers for login + </_summary> + <_description> + The login screen can optionally allow users who have smartcards + to log in using those smartcards. + </_description> + </key> + </schema> +</schemalist> diff --git a/gui/simple-greeter/extensions/fingerprint/Makefile.am b/gui/simple-greeter/extensions/fingerprint/Makefile.am index ca65f4b3..e263e15f 100644 --- a/gui/simple-greeter/extensions/fingerprint/Makefile.am +++ b/gui/simple-greeter/extensions/fingerprint/Makefile.am @@ -3,10 +3,6 @@ SUBDIRS = icons NULL = PAM_SERVICE_NAME = gdm-fingerprint -gsettings_SCHEMAS =org.gnome.display-manager.extensions.fingerprint.gschema.xml -@INTLTOOL_XML_NOMERGE_RULE@ -@GSETTINGS_RULES@ - extensiondir = $(GDM_SIMPLE_GREETER_EXTENSIONS_DATA_DIR)/fingerprint extension_DATA = page.ui @@ -49,11 +45,10 @@ $(PAM_SERVICE_NAME): $(PAM_SERVICE_NAME).pam pamdir = $(PAM_PREFIX)/pam.d pam_DATA = $(PAM_SERVICE_NAME) -EXTRA_DIST = $(extension_DATA) $(gsettings_SCHEMAS).in $(gsettings_SCHEMAS) $(PAM_SERVICE_NAME).pam -CLEANFILES = $(PAM_SERVICE_NAME) $(gsettings_SCHEMAS) +EXTRA_DIST = $(extension_DATA) $(gsettings_SCHEMAS) $(PAM_SERVICE_NAME).pam +CLEANFILES = $(PAM_SERVICE_NAME) MAINTAINERCLEANFILES = \ *~ \ $(PAM_SERVICE_NAME) \ - $(gsettings_SCHEMAS) \ Makefile.in diff --git a/gui/simple-greeter/extensions/fingerprint/gdm-fingerprint-extension.c b/gui/simple-greeter/extensions/fingerprint/gdm-fingerprint-extension.c index 0e2e83d1..ef0e0019 100644 --- a/gui/simple-greeter/extensions/fingerprint/gdm-fingerprint-extension.c +++ b/gui/simple-greeter/extensions/fingerprint/gdm-fingerprint-extension.c @@ -307,7 +307,7 @@ gdm_fingerprint_extension_is_visible (GdmLoginExtension *login_extension) char *contents, **lines; int i; - if (!g_settings_get_boolean (extension->priv->settings, "active")) { + if (!g_settings_get_boolean (extension->priv->settings, "enable-fingerprint-authentication")) { return FALSE; } @@ -443,7 +443,7 @@ gdm_fingerprint_extension_init (GdmFingerprintExtension *extension) extension->priv->message_queue = g_queue_new (); - extension->priv->settings = g_settings_new ("org.gnome.display-manager.extensions.fingerprint"); + extension->priv->settings = g_settings_new ("org.gnome.login-screen"); extension->priv->bus_connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); gdm_fingerprint_extension_reset (GDM_LOGIN_EXTENSION (extension)); diff --git a/gui/simple-greeter/extensions/fingerprint/org.gnome.display-manager.extensions.fingerprint.gschema.xml.in b/gui/simple-greeter/extensions/fingerprint/org.gnome.display-manager.extensions.fingerprint.gschema.xml.in deleted file mode 100644 index 48d57bd8..00000000 --- a/gui/simple-greeter/extensions/fingerprint/org.gnome.display-manager.extensions.fingerprint.gschema.xml.in +++ /dev/null @@ -1,9 +0,0 @@ -<schemalist> - <schema id="org.gnome.display-manager.extensions.fingerprint" path="/org/gnome/display-manager/extensions/fingerprint/"> - <key name="active" type="b"> - <default>true</default> - <_summary>Activation of this plugin</_summary> - <_description>Whether this plugin would be activated or not</_description> - </key> - </schema> -</schemalist> diff --git a/gui/simple-greeter/extensions/smartcard/Makefile.am b/gui/simple-greeter/extensions/smartcard/Makefile.am index 1ab76b52..695ce138 100644 --- a/gui/simple-greeter/extensions/smartcard/Makefile.am +++ b/gui/simple-greeter/extensions/smartcard/Makefile.am @@ -3,10 +3,6 @@ SUBDIRS = icons NULL = PAM_SERVICE_NAME = gdm-smartcard -gsettings_SCHEMAS =org.gnome.display-manager.extensions.smartcard.gschema.xml -@INTLTOOL_XML_NOMERGE_RULE@ -@GSETTINGS_RULES@ - extensiondir = $(GDM_SIMPLE_GREETER_EXTENSIONS_DATA_DIR)/smartcard extension_DATA = page.ui @@ -69,11 +65,10 @@ $(PAM_SERVICE_NAME): $(PAM_SERVICE_NAME).pam pamdir = $(PAM_PREFIX)/pam.d pam_DATA = $(PAM_SERVICE_NAME) -EXTRA_DIST = $(extension_DATA) $(gsettings_SCHEMAS).in $(gsettings_SCHEMAS) $(PAM_SERVICE_NAME).pam -CLEANFILES = $(PAM_SERVICE_NAME) $(gsettings_SCHEMAS) +EXTRA_DIST = $(extension_DATA) $(PAM_SERVICE_NAME).pam +CLEANFILES = $(PAM_SERVICE_NAME) MAINTAINERCLEANFILES = \ *~ \ $(PAM_SERVICE_NAME) \ - $(gsettings_SCHEMAS) \ Makefile.in diff --git a/gui/simple-greeter/extensions/smartcard/gdm-smartcard-extension.c b/gui/simple-greeter/extensions/smartcard/gdm-smartcard-extension.c index 825683e1..6378d095 100644 --- a/gui/simple-greeter/extensions/smartcard/gdm-smartcard-extension.c +++ b/gui/simple-greeter/extensions/smartcard/gdm-smartcard-extension.c @@ -430,7 +430,7 @@ gdm_smartcard_extension_is_visible (GdmLoginExtension *login_extension) guint i; pid_t pid; - if (!g_settings_get_boolean (extension->priv->settings, "active")) { + if (!g_settings_get_boolean (extension->priv->settings, "enable-smartcard-authentication")) { return FALSE; } @@ -586,7 +586,7 @@ gdm_smartcard_extension_init (GdmSmartcardExtension *extension) extension->priv->message_queue = g_queue_new (); - extension->priv->settings = g_settings_new ("org.gnome.display-manager.extensions.smartcard"); + extension->priv->settings = g_settings_new ("org.gnome.login-screen"); gdm_smartcard_extension_reset (GDM_LOGIN_EXTENSION (extension)); } diff --git a/gui/simple-greeter/extensions/smartcard/org.gnome.display-manager.extensions.smartcard.gschema.xml.in b/gui/simple-greeter/extensions/smartcard/org.gnome.display-manager.extensions.smartcard.gschema.xml.in deleted file mode 100644 index 3c90bb40..00000000 --- a/gui/simple-greeter/extensions/smartcard/org.gnome.display-manager.extensions.smartcard.gschema.xml.in +++ /dev/null @@ -1,9 +0,0 @@ -<schemalist> - <schema id="org.gnome.display-manager.extensions.smartcard" path="/org/gnome/display-manager/extensions/smartcard/"> - <key name="active" type="b"> - <default>true</default> - <_summary>Activation of this plugin</_summary> - <_description>Whether this plugin would be activated or not</_description> - </key> - </schema> -</schemalist> |