load_key_file_for_file (GdmSession   *self,
                        const char   *file,
                        char        **full_path)
{
        GKeyFile   *key_file;
        GError     *error;
        gboolean    res;

        key_file = g_key_file_new ();

        error = NULL;
        res = g_key_file_load_from_dirs (key_file,
                                         file,
                                         get_system_session_dirs (self),
                                         full_path,
                                         G_KEY_FILE_NONE,
                                         &error);
        if (! res) {
                g_debug ("GdmSession: File '%s' not found: %s", file, error->message);
                g_error_free (error);
                g_key_file_free (key_file);
                key_file = NULL;
        }

        return key_file;
}
load_key_file_for_file (GdmSession   *self,
                        const char   *file,
                        char        **full_path)
{
        GKeyFile   *key_file;
        GError     *error;
        gboolean    res;

        key_file = g_key_file_new ();

        error = NULL;
        res = g_key_file_load_from_dirs (key_file,
                                         file,
                                         get_system_session_dirs (self),
                                         full_path,
                                         G_KEY_FILE_NONE,
                                         &error);
        if (! res) {
                g_debug ("GdmSession: File '%s' not found: %s", file, error->message);
                g_error_free (error);
                g_key_file_free (key_file);
                key_file = NULL;
        }

        return key_file;
}