summaryrefslogtreecommitdiff
path: root/daemon/gdm-session.h
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2012-07-09 21:33:10 -0400
committerRay Strode <rstrode@redhat.com>2012-07-17 04:14:56 -0400
commit2853ce5812aa8f03f677516e64d5dcff1e6e01ab (patch)
tree9287b11efc20a033ca2d57a99d7046c607163e18 /daemon/gdm-session.h
parent4f86de30a115a77cf61b4652fef53f9f0517fc0b (diff)
downloadgdm-2853ce5812aa8f03f677516e64d5dcff1e6e01ab.tar.gz
worker: add reauthentication support
This commit adds reauthentication support for screensavers and user switching to use. 1) It adds a "verification mode" argument to the GdmSession constructor that tweaks the behavior of how the session worker acts to fit login or unlock scenarios better. 2) It adds a way for programs to open a communication channel for user verification to already runnings sessions (so reauthentication happens in the context of the session).
Diffstat (limited to 'daemon/gdm-session.h')
-rw-r--r--daemon/gdm-session.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/daemon/gdm-session.h b/daemon/gdm-session.h
index ad5f8852..3a1d0fdd 100644
--- a/daemon/gdm-session.h
+++ b/daemon/gdm-session.h
@@ -37,7 +37,8 @@ typedef struct _GdmSessionPrivate GdmSessionPrivate;
typedef enum
{
GDM_SESSION_VERIFICATION_MODE_LOGIN,
- GDM_SESSION_VERIFICATION_MODE_CHOOSER
+ GDM_SESSION_VERIFICATION_MODE_CHOOSER,
+ GDM_SESSION_VERIFICATION_MODE_REAUTHENTICATE
} GdmSessionVerificationMode;
typedef struct
@@ -59,6 +60,8 @@ typedef struct
void (* client_connected) (GdmSession *session);
void (* client_disconnected) (GdmSession *session);
void (* disconnected) (GdmSession *session);
+ void (* verification_complete) (GdmSession *session,
+ const char *service_name);
void (* session_opened) (GdmSession *session,
const char *service_name,
const char *session_id);
@@ -73,6 +76,10 @@ typedef struct
int exit_code);
void (* session_died) (GdmSession *session,
int signal_number);
+ void (* reauthentication_started) (GdmSession *session,
+ GPid pid_of_caller);
+ void (* reauthenticated) (GdmSession *session,
+ const char *service_name);
void (* conversation_started) (GdmSession *session,
const char *service_name);
void (* conversation_stopped) (GdmSession *session,
@@ -84,12 +91,17 @@ typedef struct
GType gdm_session_get_type (void);
GdmSession *gdm_session_new (GdmSessionVerificationMode verification_mode,
+ uid_t allowed_user,
const char *display_name,
const char *display_hostname,
const char *display_device,
const char *display_seat_id,
const char *display_x11_authority_file,
gboolean display_is_local);
+uid_t gdm_session_get_allowed_user (GdmSession *session);
+void gdm_session_start_reauthentication (GdmSession *session,
+ GPid pid_of_caller,
+ uid_t uid_of_caller);
char *gdm_session_get_server_address (GdmSession *session);
char *gdm_session_get_username (GdmSession *session);