summaryrefslogtreecommitdiff
path: root/libgdm
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 /libgdm
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 'libgdm')
-rw-r--r--libgdm/gdm-user-switching.c45
1 files changed, 16 insertions, 29 deletions
diff --git a/libgdm/gdm-user-switching.c b/libgdm/gdm-user-switching.c
index 760347fc..3d4303e3 100644
--- a/libgdm/gdm-user-switching.c
+++ b/libgdm/gdm-user-switching.c
@@ -31,9 +31,7 @@
#include <glib-object.h>
#include <gio/gio.h>
-#ifdef WITH_SYSTEMD
#include <systemd/sd-login.h>
-#endif
#include "common/gdm-common.h"
#include "gdm-user-switching.h"
@@ -69,14 +67,12 @@ create_transient_display (GDBusConnection *connection,
return TRUE;
}
-#ifdef WITH_SYSTEMD
-
static gboolean
-activate_session_id_for_systemd (GDBusConnection *connection,
- GCancellable *cancellable,
- const char *seat_id,
- const char *session_id,
- GError **error)
+activate_session_id (GDBusConnection *connection,
+ GCancellable *cancellable,
+ const char *seat_id,
+ const char *session_id,
+ GError **error)
{
GVariant *reply;
@@ -101,8 +97,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;
@@ -186,9 +182,9 @@ out:
}
static gboolean
-goto_login_session_for_systemd (GDBusConnection *connection,
- GCancellable *cancellable,
- GError **error)
+goto_login_session (GDBusConnection *connection,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean ret;
int res;
@@ -242,9 +238,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, cancellable, seat_id, session_id, error);
+ res = activate_session_id (connection, cancellable, seat_id, session_id, error);
if (res) {
ret = TRUE;
@@ -263,11 +259,10 @@ goto_login_session_for_systemd (GDBusConnection *connection,
return ret;
}
-#endif
gboolean
gdm_goto_login_session_sync (GCancellable *cancellable,
- GError **error)
+ GError **error)
{
GDBusConnection *connection;
gboolean retval;
@@ -276,16 +271,8 @@ gdm_goto_login_session_sync (GCancellable *cancellable,
if (!connection)
return FALSE;
-#ifdef WITH_SYSTEMD
- if (LOGIND_RUNNING()) {
- retval = goto_login_session_for_systemd (connection,
- cancellable,
- error);
-
- g_object_unref (connection);
- return retval;
- }
-#endif
+ retval = goto_login_session (connection, cancellable, error);
- return FALSE;
+ g_object_unref (connection);
+ return retval;
}