]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Remove lightdm-set-defaults and gdmflexiserver.
authorRobert Ancell <robert.ancell@canonical.com>
Sun, 17 Nov 2013 00:08:46 +0000 (00:08 +0000)
committerTarmac <Unknown>
Sun, 17 Nov 2013 00:08:46 +0000 (00:08 +0000)
lightdm-set-defaults is not required since 1.8 as configuration can now be loaded from a lightdm.conf.d directory. This allows a file per setting to be written and better handles more than one thing (e.g. a packaging system) setting these values.

Any software that still relies on gdmflexiserver should have switched to using dm-tool or the D-Bus interface by now.

Drop the GDM migration in the Ubuntu packaging. All Ubuntu users upgrading to this version of LightDM will be using at least 12.04 which had LightDM installed by default. (Only upgrades back to the last LTS are required to work).

Approved by Robert Ancell, PS Jenkins bot.

19 files changed:
.bzrignore
Makefile.am
configure.ac
data/Makefile.am
data/dm-tool.1
data/lightdm-set-defaults.1 [deleted file]
data/lightdm.1
debian/lightdm.postinst
debian/rules
po/POTFILES.in
src/Makefile.am
src/dm-tool.c [moved from utils/dm-tool.c with 100% similarity]
src/session-child.c
tests/Makefile.am
tests/scripts/util-path.conf [deleted file]
tests/test-util-path [deleted file]
utils/Makefile.am [deleted file]
utils/gdmflexiserver [deleted file]
utils/lightdm-set-defaults.c [deleted file]

index 8c735385a1095032b17843dbbd38bb475de6bdd0..26b5628a964045ea9fdd4c30279a55bf08e8c33d 100644 (file)
@@ -51,12 +51,7 @@ m4/*
 po/*.gmo
 po/POTFILES
 po/stamp-it
-src/display-glue.h
-src/display-manager-glue.h
-src/session-manager-glue.h
-src/user-manager-glue.h
-src/ldm-marshal.c
-src/ldm-marshal.h
+src/dm-tool
 src/lightdm
 src/lightdm-guest-session-wrapper
 tests/*.log
@@ -69,6 +64,7 @@ tests/src/initctl
 tests/src/plymouth
 tests/src/test-gobject-greeter
 tests/src/test-greeter-wrapper
+tests/src/test-guest-wrapper
 tests/src/test-mir-greeter
 tests/src/test-qt4-greeter
 tests/src/test-qt5-greeter
@@ -79,5 +75,3 @@ tests/src/unity-system-compositor
 tests/src/vnc-client
 tests/src/X
 tests/src/Xvnc
-utils/lightdm-set-defaults
-utils/dm-tool
index 467d5c6fbdb0829ca35c6a617125c75838361852..73c6788e93bf7cce892f98cd9d5531a157d871b2 100644 (file)
@@ -6,7 +6,7 @@ SUBDIRS += liblightdm-qt
 if COMPILE_TESTS
 SUBDIRS += tests
 endif
-SUBDIRS += data po src doc help utils
+SUBDIRS += data po src doc help
 
 DISTCHECK_CONFIGURE_FLAGS = --enable-introspection --enable-gtk-doc
 
index a87fb93e86010d11a4d92fcb783cced23a0c8e06..a57e166880c6346895362d7836819fde6056b192 100644 (file)
@@ -217,7 +217,6 @@ po/Makefile.in
 src/Makefile
 tests/Makefile
 tests/src/Makefile
-utils/Makefile
 ])
 AC_OUTPUT
 
index 89bea381d86bbb68ecdc2a32c04c1f701b3127fd..69fd1d2be320f8c138bc3e498054cfadeb6727c4 100644 (file)
@@ -25,8 +25,7 @@ dist_apparmor_profile_abstractions_DATA = \
     apparmor/abstractions/lightdm_chromium-browser
 
 dist_man1_MANS = dm-tool.1 \
-                 lightdm.1 \
-                 lightdm-set-defaults.1
+                 lightdm.1
 
 EXTRA_DIST = apparmor/lightdm-guest-session.in
 CLEANFILES = lightdm-guest-session
index f4ceae23a7a4bc3a006bfc7f5470daa1abb65a88..1637f313b5c2839a3b498569e02cf8ddcfd50f22 100644 (file)
@@ -59,5 +59,4 @@ Connect an existing X server to the display manager.
 .B add-seat TYPE [NAME=VALUE...]
 Add a dynamic seat.
 .SH SEE ALSO
-.BR lightdm (1),
-.BR lightdm-set-defaults (1)
+.BR lightdm (1)
diff --git a/data/lightdm-set-defaults.1 b/data/lightdm-set-defaults.1
deleted file mode 100644 (file)
index 1cc68dc..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-.TH LIGHTDM-SET-DEFAULTS 1 "7 November 2013"
-.SH NAME
-lightdm-set-defaults \- sets configuration options for lightdm
-.SH SYNOPSIS
-.B lightdm-set-defaults
-[
-.I OPTION
-]
-.SH DESCRIPTION
-.B lightdm-set-defaults
-sets configuration options for lightdm.  Requires root permissions to run.
-.SH OPTIONS
-.TP
-.B \-h, \-\-help
-Show help options
-.TP
-.B \-k, \-\-keep\-old
-Only update if no default already set
-.TP
-.B \-d, \-\-debug
-Enable debugging messages
-.TP
-.B \-r, \-\-remove
-Remove default value if it's the current one
-.TP
-.B \-s, \-\-session=SESSION_NAME
-Set the default session to SESSION_NAME
-.TP
-.B \-g, \-\-greeter=GREETER_NAME
-Set the default greeter to GREETER_NAME
-.TP
-.B \-a, \-\-autologin=USERNAME
-Set the autologin user to USERNAME
-.TP
-.B \-i, \-\-hide\-users=<true|false>
-Set greeter-hide-users to true or false.
-.TP
-.B \-m, \-\-show\-manual\-login=<true|false>
-Set show-manual-login to true or false.
-.TP
-.B \-R, \-\-show\-remote\-login=<true|false>
-Set show-manual-login to true or false.
-.TP
-.B \-l, \-\-allow\-guest=<true|false>
-Set allow-guest to true or false.
-.SH FILES
-.TP
-.B /etc/lightdm/lightdm.conf
-Configuration
-.SH SEE ALSO
-.BR lightdm (1),
-.BR dm-tool (1)
index 27f80912b432b6c09b5015fcd9a85ba7f3ce5605..a6c90b2b920ee575d2c54ff968e1ca4cfba4690c 100644 (file)
@@ -54,5 +54,4 @@ User list configuration (if not using Accounts Service)
 .B /etc/lightdm/keys.conf
 XDMCP keys
 .SH SEE ALSO
-.BR dm-tool (1),
-.BR lightdm-set-defaults (1)
+.BR dm-tool (1)
index c61da08280844a27b26592fe394b9fe5051a08a4..5c104883d89b62818059dcf16ad50616a2f08b29 100644 (file)
@@ -69,16 +69,6 @@ fi
 # stdout, which can confuse debconf.
 db_stop
 
-# migrate gdm configuration on first-time installation
-if [ -z "$2" ]; then
-    if grep -q '^AutomaticLoginEnable *= *true$' /etc/gdm/custom.conf 2>/dev/null; then
-        user=`sed -n '/^AutomaticLogin *=/ { s/^.*= *//; p }' /etc/gdm/custom.conf`
-        if [ -n "$user" ]; then
-            /usr/lib/lightdm/lightdm-set-defaults --keep-old --autologin="$user"
-        fi
-    fi
-fi
-
 case "$1" in
     configure)
         # LP: #1189948
index 6135377b09810f92f9f54cd03d0e3d4eebd512e0..3c262e6a570a49cf7ab316b0c15a26280ae8cf50 100755 (executable)
@@ -21,7 +21,6 @@ override_dh_install:
        rm -r debian/tmp/usr/share/help/C/
        # we do install pam through installpam and init through installinit
        dh_install -X.a -X.la -Xpam.d -X'etc/init/lightdm.conf' --fail-missing
-       mv debian/lightdm/usr/lib/lightdm/lightdm/lightdm-set-defaults debian/lightdm/usr/lib/lightdm
        chmod +x debian/lightdm/usr/lib/lightdm/lightdm-greeter-session
 
 override_dh_installinit:
index 792db4fe1ff3bcbbaee5347feab7840836018b3f..fcd65f678031c66bc784432bd453e6186c02e389 100644 (file)
@@ -2,5 +2,4 @@
 # Please keep this file sorted alphabetically.
 [encoding: UTF-8]
 src/lightdm.c
-utils/lightdm-set-defaults.c
 utils/dm-tool.c
index 62ed09de806f61b2e8cefd85038b1485fd4caf18..c2237f696a882c99f506339288dc536557ec85d8 100644 (file)
@@ -1,4 +1,5 @@
 sbin_PROGRAMS = lightdm
+bin_PROGRAMS = dm-tool
 
 lightdm_SOURCES = \
        accounts.c \
@@ -77,7 +78,6 @@ lightdm_SOURCES = \
 lightdm_CFLAGS = \
        $(LIGHTDM_CFLAGS) \
        $(WARN_CFLAGS) \
-       -DPKGLIBEXEC_DIR=\"$(pkglibexecdir)\" \
        -DSBIN_DIR=\"$(sbindir)\" \
        -DCONFIG_DIR=\"$(sysconfdir)/lightdm\" \
        -DLOG_DIR=\"$(localstatedir)/log/lightdm\" \
@@ -93,6 +93,17 @@ lightdm_LDADD = \
        -lgcrypt \
        -lpam
 
+dm_tool_SOURCES = \
+       dm-tool.c
+
+dm_tool_CFLAGS = \
+       $(LIGHTDM_CFLAGS) \
+       -DCONFIG_DIR=\"$(sysconfdir)/lightdm\" \
+       -DLOCALE_DIR=\"$(datadir)/locale\"
+
+dm_tool_LDADD = \
+       $(LIGHTDM_LIBS)
+
 pkglibexec_PROGRAMS = lightdm-guest-session-wrapper
 
 lightdm_guest_session_wrapper_SOURCES = lightdm-guest-session-wrapper.c
similarity index 100%
rename from utils/dm-tool.c
rename to src/dm-tool.c
index bf70aa7f4d007ea4f16a005fb6d1d30ec3486082..f9d0bfb31f50d1718925dce24fc3f031feda4c00 100644 (file)
@@ -530,11 +530,6 @@ session_child_run (int argc, char **argv)
         g_free (value);
     }
 
-    /* Put our tools directory in the path as a hack so we can use the legacy gdmflexiserver interface */
-    path = pam_getenv (pam_handle, "PATH");
-    if (path)
-        pam_putenv (pam_handle, g_strdup_printf ("PATH=%s:%s", PKGLIBEXEC_DIR, path));
-
     /* Catch terminate signal and pass it to the child */
     signal (SIGTERM, signal_cb);
 
index 92014235ac8fdd4fe4936f26fac9b02fd00a71d9..6bc5167aa4d8d8c452afa853d9f74b62ed49910d 100644 (file)
@@ -52,7 +52,6 @@ TESTS = \
        test-xdg-current-desktop \
        test-xdg-seat \
        test-language-env \
-       test-util-path \
        test-session-stdout \
        test-session-stderr \
        test-session-stderr-multi-write \
@@ -451,7 +450,6 @@ EXTRA_DIST = \
        scripts/user-layout.conf \
        scripts/user-logged-in.conf \
        scripts/user-name.conf \
-       scripts/util-path.conf \
        scripts/user-renamed.conf \
        scripts/user-renamed-invalid.conf \
        scripts/user-session.conf \
diff --git a/tests/scripts/util-path.conf b/tests/scripts/util-path.conf
deleted file mode 100644 (file)
index fe21ed8..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Check utility path is set in session
-#
-
-[SeatDefaults]
-autologin-user=have-password1
-user-session=default
-
-#?RUNNER DAEMON-START
-
-# X server starts
-#?XSERVER-0 START VT=7
-
-# Daemon connects when X server is ready
-#?*XSERVER-0 INDICATE-READY
-#?XSERVER-0 INDICATE-READY
-#?XSERVER-0 ACCEPT-CONNECT
-
-# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 DESKTOP_SESSION=default USER=have-password1
-#?XSERVER-0 ACCEPT-CONNECT
-#?SESSION-X-0 CONNECT-XSERVER
-
-# Check utility path is there
-#?*SESSION-X-0 READ-ENV NAME=PATH
-# FIXME: This is a really crap regex and the path could be overridden in the configure stage
-#?SESSION-X-0 READ-ENV NAME=PATH VALUE=.*/lightdm:.*
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-X-0 TERMINATE SIGNAL=15
-#?XSERVER-0 TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/test-util-path b/tests/test-util-path
deleted file mode 100755 (executable)
index 05c7cd5..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner util-path test-gobject-greeter
diff --git a/utils/Makefile.am b/utils/Makefile.am
deleted file mode 100644 (file)
index 6c75d6d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-bin_PROGRAMS = dm-tool
-pkglibexec_PROGRAMS = lightdm-set-defaults
-legacydir = $(libexecdir)/lightdm
-dist_legacy_SCRIPTS = gdmflexiserver
-
-dm_tool_SOURCES = \
-       dm-tool.c
-
-dm_tool_CFLAGS = \
-       $(LIGHTDM_CFLAGS) \
-       -DCONFIG_DIR=\"$(sysconfdir)/lightdm\" \
-       -DLOCALE_DIR=\"$(datadir)/locale\"
-
-dm_tool_LDADD = \
-       $(LIGHTDM_LIBS)
-
-lightdm_set_defaults_SOURCES = \
-       lightdm-set-defaults.c
-
-lightdm_set_defaults_CFLAGS = \
-       $(LIGHTDM_CFLAGS) \
-       -DCONFIG_DIR=\"$(sysconfdir)/lightdm\" \
-       -DLOCALE_DIR=\"$(datadir)/locale\"
-
-lightdm_set_defaults_LDADD = \
-       $(LIGHTDM_LIBS)
-
-DISTCLEANFILES = \
-    Makefile.in
-
diff --git a/utils/gdmflexiserver b/utils/gdmflexiserver
deleted file mode 100755 (executable)
index 0e04030..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011 Canonical Ltd
-# Author: Michael Terry <michael.terry@canonical.com>
-# 
-# This program is free software: you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation, version 3 of the License.
-#
-# See http://www.gnu.org/copyleft/gpl.html for the full text of the license.
-
-if [ -z "$XDG_SEAT_PATH" ]; then
-  # something went wrong
-  exit 1
-fi
-
-dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter
diff --git a/utils/lightdm-set-defaults.c b/utils/lightdm-set-defaults.c
deleted file mode 100644 (file)
index 75ea17c..0000000
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * Copyright (C) 2011 Didier Roche.
- * Author: Didier Roche <didrocks@ubuntu.com>
- * 
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
- * license.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <glib.h>
-#include <glib/gi18n.h>
-
-#define SEATDEFAULT_KEY_GROUP "SeatDefaults"
-#define TYPE_KEY_NAME  "type"
-#define SESSION_KEY_NAME  "user-session"
-#define GREETER_KEY_NAME  "greeter-session"
-#define AUTOLOGIN_KEY_NAME  "autologin-user"
-#define HIDE_USERS_KEY_NAME  "greeter-hide-users"
-#define MANUAL_LOGIN_KEY_NAME  "greeter-show-manual-login"
-#define REMOTE_LOGIN_KEY_NAME  "greeter-show-remote-login"
-#define ALLOW_GUEST_KEY_NAME  "allow-guest"
-
-#define IS_STRING_EMPTY(x) ((x)==NULL||(x)[0]=='\0')
-
-static gboolean debug = FALSE;
-static gboolean keep_old = FALSE;
-static gboolean remove = FALSE;
-static gboolean hide_users = FALSE;
-static gboolean show_manual_login = FALSE;
-static gboolean show_remote_login = FALSE;
-static gboolean allow_guest = FALSE;
-
-static char    *type = NULL;
-static char    *session = NULL;
-static char    *greeter = NULL;
-static char    *autologin = NULL;
-static char    *str_hide_users = NULL;
-static char    *str_show_manual_login = NULL;
-static char    *str_show_remote_login = NULL;
-static char    *str_allow_guest = NULL;
-
-static GOptionEntry entries[] =
-{
-  { "debug",    'd', 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging"), NULL },
-  { "keep-old", 'k', 0, G_OPTION_ARG_NONE, &keep_old, N_("Only update if no default already set"), NULL },
-  { "remove",   'r', 0, G_OPTION_ARG_NONE, &remove, N_("Remove default value if it's the current one"), NULL },
-  { "type",     't', 0, G_OPTION_ARG_STRING, &type, N_("Set default seat type"), NULL },
-  { "session",  's', 0, G_OPTION_ARG_STRING, &session, N_("Set default session"), NULL },
-  { "greeter",  'g', 0, G_OPTION_ARG_STRING, &greeter, N_("Set default greeter"), NULL },
-  { "autologin",'a', 0, G_OPTION_ARG_STRING, &autologin, N_("Set autologin user"), NULL },
-  { "hide-users",'i', 0, G_OPTION_ARG_STRING, &str_hide_users, N_("Set greeter-hide-users to true or false"), NULL },
-  { "show-manual-login",'m', 0, G_OPTION_ARG_STRING, &str_show_manual_login, N_("Set show-manual-login to true or false"), NULL },
-  { "show-remote-login",'R', 0, G_OPTION_ARG_STRING, &str_show_remote_login, N_("Set show-remote-login to true or false"), NULL },
-  { "allow-guest",'l', 0, G_OPTION_ARG_STRING, &str_allow_guest, N_("Set allow-guest to true or false"), NULL },
-  { NULL }
-};
-
-void
-show_nothing(const gchar   *log_domain,
-             GLogLevelFlags log_level,
-             const gchar   *message,
-             gpointer       unused_data) {};
-
-int
-update_boolean(const gboolean new_value,
-              gboolean     keep_old,
-              const gchar *key_group,
-              const gchar *key_name,
-              GKeyFile    *keyfile)
-{
-    if (keep_old)
-        g_debug ("keep-old mode: keep previous default value");
-    else {
-        g_debug ("Update to %d for %s", new_value, key_name);
-        g_key_file_set_boolean (keyfile, key_group, key_name, new_value);
-    }
-    return(0);
-}
-
-int
-update_string(const gchar *default_value,
-              const gchar *new_value,
-              gboolean     keep_old,
-              gboolean     remove,
-              const gchar *key_group,
-              const gchar *key_name,
-              GKeyFile    *keyfile)
-{
-    if (!(default_value) || (strlen(default_value) < 1)) {
-        g_debug ("No existing valid value for %s. Set to %s", key_name, new_value);
-        g_key_file_set_string (keyfile, key_group, key_name, new_value);
-    }
-    else {
-        if (remove) {
-            if (g_strcmp0 (default_value, new_value) == 0) {
-                g_debug ("Remove %s as default value for %s", default_value, key_name);
-                g_key_file_set_string (keyfile, key_group, key_name, "");
-                return(0);
-            }
-            g_debug ("Can't remove: %s is not the default value for %s", default_value, key_name);
-            return(4);
-        }
-        else {
-            g_debug ("Found existing default value(%s) for %s", default_value, key_name);
-            if (keep_old)
-                g_debug ("keep-old mode: keep previous default value");
-            else {
-                g_debug ("Update to %s for %s", new_value, key_name);
-                g_key_file_set_string (keyfile, key_group, key_name, new_value);
-            }
-        }
-    }
-    return(0);
-}
-
-int 
-str_to_bool(const gchar *str, gboolean *bool_out)
-{
-    if (IS_STRING_EMPTY(str)) {
-        return -1;
-    }
-    else if (strncasecmp(str, "true", 4)==0) {
-        *bool_out = TRUE;
-        return 0;
-    }
-    else if (strncasecmp(str, "false", 5)==0) {
-        *bool_out = FALSE;
-        return 0;
-    }
-    else {
-        return -2;
-    }
-}
-
-int 
-main (int argc, char *argv[])
-{
-    GOptionContext *context = NULL;
-    GError         *error = NULL;
-
-    GKeyFile       *keyfile;
-    GKeyFileFlags   flags;
-    gchar          *s_data;
-    gsize           size;
-    const gchar    *gdm_conf_file = CONFIG_DIR "/lightdm.conf";
-
-    gchar          *default_type = NULL;
-    gchar          *default_session = NULL;
-    gchar          *default_greeter = NULL;
-    gchar          *default_autologin = NULL;
-    gint            return_code = 0;
-
-    bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
-    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-    textdomain (GETTEXT_PACKAGE);
-
-#if !defined(GLIB_VERSION_2_36)
-    g_type_init ();
-#endif
-
-    context = g_option_context_new (N_("- set lightdm default values"));
-    g_option_context_add_main_entries (context, entries, NULL);
-    if (!g_option_context_parse (context, &argc, &argv, &error)) {
-        g_printerr (N_("option parsing failed: %s\n"), error->message);
-        g_option_context_free (context);
-        g_error_free (error);
-        return 1;
-    }
-    if (IS_STRING_EMPTY (type) && IS_STRING_EMPTY (session) && IS_STRING_EMPTY (greeter) && IS_STRING_EMPTY (autologin) && IS_STRING_EMPTY(str_hide_users) && IS_STRING_EMPTY(str_show_manual_login) && IS_STRING_EMPTY(str_show_remote_login) && IS_STRING_EMPTY(str_allow_guest)) {
-        g_printerr (N_("Wrong usage of the command\n%s"), g_option_context_get_help (context, FALSE, NULL));
-        g_option_context_free (context);
-        return 1;
-    }
-    if (context)
-        g_option_context_free (context); 
-    if (!debug)
-        g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, show_nothing, NULL);
-
-    keyfile = g_key_file_new ();
-    flags = G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS;
-    if (!(g_key_file_load_from_file (keyfile, gdm_conf_file, flags, &error))) {
-            g_debug ("File doesn't seem to exist or can't be read: create one (%s)", error->message);
-            g_error_free (error);
-            error = NULL;
-    }
-
-    // try to get the right keys
-    default_type = g_key_file_get_string (keyfile, SEATDEFAULT_KEY_GROUP, TYPE_KEY_NAME, NULL);
-    default_session = g_key_file_get_string (keyfile, SEATDEFAULT_KEY_GROUP, SESSION_KEY_NAME, NULL);
-    default_greeter = g_key_file_get_string (keyfile, SEATDEFAULT_KEY_GROUP, GREETER_KEY_NAME, NULL);
-    default_autologin = g_key_file_get_string (keyfile, SEATDEFAULT_KEY_GROUP, AUTOLOGIN_KEY_NAME, NULL);
-
-    if (!(IS_STRING_EMPTY (type)))
-        return_code = update_string (default_type, type, keep_old, remove, SEATDEFAULT_KEY_GROUP, TYPE_KEY_NAME, keyfile);
-    if (!(IS_STRING_EMPTY (session)))
-        return_code = update_string (default_session, session, keep_old, remove, SEATDEFAULT_KEY_GROUP, SESSION_KEY_NAME, keyfile);
-    if (!(IS_STRING_EMPTY (greeter)) && (return_code == 0))
-        return_code = update_string (default_greeter, greeter, keep_old, remove, SEATDEFAULT_KEY_GROUP, GREETER_KEY_NAME, keyfile);
-    if (!(IS_STRING_EMPTY (autologin)) && (return_code == 0))
-        return_code = update_string (default_autologin, autologin, keep_old, remove, SEATDEFAULT_KEY_GROUP, AUTOLOGIN_KEY_NAME, keyfile);
-    if (!(IS_STRING_EMPTY(str_hide_users)) && (return_code == 0)) {
-        if (str_to_bool(str_hide_users, &hide_users) == 0) {
-            return_code = update_boolean (hide_users, keep_old, SEATDEFAULT_KEY_GROUP, HIDE_USERS_KEY_NAME, keyfile);
-        }
-        else {
-            g_printerr (N_("true and false are the only valid choices for hide-users\n"));
-            return 1;
-        }
-    }
-    if (!(IS_STRING_EMPTY(str_allow_guest)) && (return_code == 0)) {
-        if (str_to_bool(str_allow_guest, &allow_guest) == 0) {
-            return_code = update_boolean (allow_guest, keep_old, SEATDEFAULT_KEY_GROUP, ALLOW_GUEST_KEY_NAME, keyfile);
-        }
-        else {
-            g_printerr (N_("true and false are the only valid choices for allow-guest\n"));
-            return 1;
-        }
-    }
-    if (!(IS_STRING_EMPTY(str_show_manual_login)) && (return_code == 0)) {
-        if (str_to_bool(str_show_manual_login, &show_manual_login) == 0) {
-            return_code = update_boolean (show_manual_login, keep_old, SEATDEFAULT_KEY_GROUP, MANUAL_LOGIN_KEY_NAME, keyfile);
-        }
-        else {
-            g_printerr (N_("true and false are the only valid choices for show-manual-login\n"));
-            return 1;
-        }
-    }
-    if (!(IS_STRING_EMPTY(str_show_remote_login)) && (return_code == 0)) {
-        if (str_to_bool(str_show_remote_login, &show_remote_login) == 0) {
-            return_code = update_boolean (show_remote_login, keep_old, SEATDEFAULT_KEY_GROUP, REMOTE_LOGIN_KEY_NAME, keyfile);
-        }
-        else {
-            g_printerr (N_("true and false are the only valid choices for show-remote-login\n"));
-            return 1;
-        }
-    }
-
-    if (return_code == 0) {
-        s_data = g_key_file_to_data (keyfile, &size, &error);
-        if (!s_data) {
-            g_debug ("Can't convert data to string: %s", error->message);
-            g_error_free (error);
-            return_code = 1;
-        }
-        else {
-            if(!g_file_set_contents (gdm_conf_file, s_data, size, &error)) {
-                g_printerr ("Can't update: %s\n", error->message);
-                g_error_free (error);
-                return_code = 1;
-            }
-            g_free (s_data);
-         }
-    }
-
-    g_key_file_free (keyfile);
-
-    if (default_type)
-        g_free (default_type);
-    if (default_session)
-        g_free (default_session);
-    if (default_greeter)
-        g_free (default_greeter);
-    if (default_autologin)
-        g_free (default_autologin);
-
-    return return_code;
-
-}