Commit 4b3fdd19 authored by Robert Ancell's avatar Robert Ancell

daemon: Write GDM custom.conf file if it doesn't exist

The previous code would abort the write if it didn't exist.
parent 6aa3ad8d
Pipeline #60987 passed with stage
in 1 minute and 25 seconds
......@@ -1522,13 +1522,18 @@ save_autologin (Daemon *daemon,
g_autoptr(GKeyFile) keyfile = NULL;
g_autofree gchar *data = NULL;
gboolean result;
g_autoptr(GError) local_error = NULL;
keyfile = g_key_file_new ();
if (!g_key_file_load_from_file (keyfile,
error)) {
return FALSE;
/* It's OK for custom.conf to not exist, we will make it */
if (!g_error_matches (local_error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
g_propagate_error (error, g_steal_pointer (&local_error));
return FALSE;
g_key_file_set_string (keyfile, "daemon", "AutomaticLoginEnable", enabled ? "True" : "False");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment