[gdm/wip/wayland-at-login-screen: 43/70] session: add authentication-failed signal
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/wayland-at-login-screen: 43/70] session: add authentication-failed signal
- Date: Wed, 18 Feb 2015 06:27:06 +0000 (UTC)
commit 8acb229c54488762582f2b869591b2a909730ee8
Author: Ray Strode <rstrode redhat com>
Date: Mon Feb 16 17:47:55 2015 -0500
session: add authentication-failed signal
This signal records when a user tried to log in but typed
the wrong password (or whatever).
We'll need this to move session recording up to GdmManager.
daemon/gdm-session.c | 20 ++++++++++++++++++++
daemon/gdm-session.h | 3 +++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 3a125a9..6f4ae3e 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -153,6 +153,7 @@ enum {
CLIENT_DISCONNECTED,
CLIENT_READY_FOR_SESSION_TO_START,
DISCONNECTED,
+ AUTHENTICATION_FAILED,
VERIFICATION_COMPLETE,
SESSION_OPENED,
SESSION_STARTED,
@@ -283,6 +284,12 @@ on_authenticate_cb (GdmDBusWorker *proxy,
if (worked) {
gdm_session_authorize (self, service_name);
} else {
+ g_signal_emit (self,
+ signals[AUTHENTICATION_FAILED],
+ 0,
+ service_name,
+ conversation->worker_pid);
+
gdm_session_record_failed (conversation->worker_pid,
self->priv->selected_user,
self->priv->display_hostname,
@@ -3291,6 +3298,19 @@ gdm_session_class_init (GdmSessionClass *session_class)
G_TYPE_NONE,
1,
G_TYPE_STRING);
+
+ signals [AUTHENTICATION_FAILED] =
+ g_signal_new ("authentication-failed",
+ GDM_TYPE_SESSION,
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GdmSessionClass, authentication_failed),
+ NULL,
+ NULL,
+ NULL,
+ G_TYPE_NONE,
+ 2,
+ G_TYPE_STRING,
+ G_TYPE_INT);
signals [VERIFICATION_COMPLETE] =
g_signal_new ("verification-complete",
GDM_TYPE_SESSION,
diff --git a/daemon/gdm-session.h b/daemon/gdm-session.h
index c339f3f..4e23301 100644
--- a/daemon/gdm-session.h
+++ b/daemon/gdm-session.h
@@ -84,6 +84,9 @@ typedef struct
void (* disconnected) (GdmSession *session);
void (* verification_complete) (GdmSession *session,
const char *service_name);
+ void (* authentication_failed) (GdmSession *session,
+ const char *service_name,
+ GPid worker_pid);
void (* session_opened) (GdmSession *session,
const char *service_name,
const char *session_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]