diff options
Diffstat (limited to 'daemon/gdm-session.c')
-rw-r--r-- | daemon/gdm-session.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c index 723aecd9..805072b5 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c @@ -143,6 +143,7 @@ enum { SETUP_COMPLETE, CANCELLED, HOSTNAME_SELECTED, + CLIENT_REJECTED, CLIENT_CONNECTED, CLIENT_DISCONNECTED, CLIENT_READY_FOR_SESSION_TO_START, @@ -1563,6 +1564,7 @@ allow_user_function (GDBusAuthObserver *observer, GdmSession *self) { uid_t client_uid; + GPid pid_of_client; client_uid = g_credentials_get_unix_user (credentials, NULL); if (client_uid == self->priv->allowed_user) { @@ -1571,6 +1573,15 @@ allow_user_function (GDBusAuthObserver *observer, g_debug ("GdmSession: User not allowed"); + pid_of_client = g_credentials_get_unix_pid (credentials, NULL); + g_signal_emit (G_OBJECT (self), + signals [CLIENT_REJECTED], + 0, + credentials, + (guint) + pid_of_client); + + return FALSE; } @@ -3259,6 +3270,19 @@ gdm_session_class_init (GdmSessionClass *session_class) G_TYPE_NONE, 0); + signals [CLIENT_REJECTED] = + g_signal_new ("client-rejected", + GDM_TYPE_SESSION, + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (GdmSessionClass, client_rejected), + NULL, + NULL, + NULL, + G_TYPE_NONE, + 2, + G_TYPE_CREDENTIALS, + G_TYPE_UINT); + signals [CLIENT_CONNECTED] = g_signal_new ("client-connected", GDM_TYPE_SESSION, |