summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-06-12 13:48:52 -0400
committerRay Strode <rstrode@redhat.com>2015-06-12 14:29:04 -0400
commit9be58c9ec9a3a411492a5182ac4b0d51fdc3a323 (patch)
tree2e332c83a5fa68e8c7114defb6603fb65045f86e /common
parent1ac67f522f5690c27023d98096ca817f12f7eb88 (diff)
downloadgdm-9be58c9ec9a3a411492a5182ac4b0d51fdc3a323.tar.gz
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
Diffstat (limited to 'common')
-rw-r--r--common/gdm-common.c31
-rw-r--r--common/gdm-common.h3
-rw-r--r--common/gdm-log.c22
3 files changed, 10 insertions, 46 deletions
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 <systemd/sd-login.h>
-#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 <unistd.h>
#include <syslog.h>
-#ifdef WITH_SYSTEMD
#include <systemd/sd-daemon.h>
-#endif
#include <glib.h>
#include <glib/gstdio.h>
@@ -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