From 9be58c9ec9a3a411492a5182ac4b0d51fdc3a323 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 12 Jun 2015 13:48:52 -0400 Subject: require logind support Now that consolekit support is gone, this commit drops all the conditionalizing of logind support. https://bugzilla.gnome.org/show_bug.cgi?id=743940 --- common/gdm-common.c | 31 ++++++++++--------------------- common/gdm-common.h | 3 --- common/gdm-log.c | 22 ---------------------- 3 files changed, 10 insertions(+), 46 deletions(-) (limited to 'common') diff --git a/common/gdm-common.c b/common/gdm-common.c index b4f98f1d..5beeebf9 100644 --- a/common/gdm-common.c +++ b/common/gdm-common.c @@ -39,9 +39,7 @@ #include "mkdtemp.h" #endif -#ifdef WITH_SYSTEMD #include -#endif #define GDM_DBUS_NAME "org.gnome.DisplayManager" #define GDM_DBUS_LOCAL_DISPLAY_FACTORY_PATH "/org/gnome/DisplayManager/LocalDisplayFactory" @@ -345,12 +343,10 @@ create_transient_display (GDBusConnection *connection, return TRUE; } -#ifdef WITH_SYSTEMD - static gboolean -activate_session_id_for_systemd (GDBusConnection *connection, - const char *seat_id, - const char *session_id) +activate_session_id (GDBusConnection *connection, + const char *seat_id, + const char *session_id) { GError *local_error = NULL; GVariant *reply; @@ -377,8 +373,8 @@ activate_session_id_for_systemd (GDBusConnection *connection, } static gboolean -get_login_window_session_id_for_systemd (const char *seat_id, - char **session_id) +get_login_window_session_id (const char *seat_id, + char **session_id) { gboolean ret; int res, i; @@ -446,8 +442,8 @@ out: } static gboolean -goto_login_session_for_systemd (GDBusConnection *connection, - GError **error) +goto_login_session (GDBusConnection *connection, + GError **error) { gboolean ret; int res; @@ -501,9 +497,9 @@ goto_login_session_for_systemd (GDBusConnection *connection, return FALSE; } - res = get_login_window_session_id_for_systemd (seat_id, &session_id); + res = get_login_window_session_id (seat_id, &session_id); if (res && session_id != NULL) { - res = activate_session_id_for_systemd (connection, seat_id, session_id); + res = activate_session_id (connection, seat_id, session_id); if (res) { ret = TRUE; @@ -522,7 +518,6 @@ goto_login_session_for_systemd (GDBusConnection *connection, return ret; } -#endif gboolean gdm_goto_login_session (GError **error) @@ -538,13 +533,7 @@ gdm_goto_login_session (GError **error) return FALSE; } -#ifdef WITH_SYSTEMD - if (LOGIND_RUNNING()) { - return goto_login_session_for_systemd (connection, error); - } -#endif - - return FALSE; + return goto_login_session (connection, error); } static void diff --git a/common/gdm-common.h b/common/gdm-common.h index d876b66e..3302afec 100644 --- a/common/gdm-common.h +++ b/common/gdm-common.h @@ -33,9 +33,6 @@ #define GDM_CUSTOM_SESSION "custom" -/* check if logind is running */ -#define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0) - GQuark gdm_common_error_quark (void); #define GDM_COMMON_ERROR gdm_common_error_quark() diff --git a/common/gdm-log.c b/common/gdm-log.c index 22d8c7d6..8a2d0154 100644 --- a/common/gdm-log.c +++ b/common/gdm-log.c @@ -30,9 +30,7 @@ #include #include -#ifdef WITH_SYSTEMD #include -#endif #include #include @@ -135,27 +133,7 @@ gdm_log_init (void) initialized = TRUE; -#ifdef WITH_SYSTEMD - is_sd_booted = sd_booted () > 0; -#endif - g_log_set_default_handler (gdm_log_default_handler, NULL); - - /* Only set up syslog if !systemd, otherwise with systemd - * enabled, we keep the default GLib log handler which goes to - * stderr, which is routed to the appropriate place in the - * systemd service file. - */ - if (!is_sd_booted) { - prg_name = g_get_prgname (); - - options = LOG_PID; -#ifdef LOG_PERROR - options |= LOG_PERROR; -#endif - - openlog (prg_name, options, LOG_DAEMON); - } } void -- cgit v1.2.1