summaryrefslogtreecommitdiff
path: root/src/login/logind-session.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-02-14 21:33:51 +0100
committerLennart Poettering <lennart@poettering.net>2012-02-14 21:37:49 +0100
commit55efac6cbcea0d8edda9c6820620ceb390009e7a (patch)
tree4cd4a938607d1ee6b8fd20e40d49d441bf134117 /src/login/logind-session.h
parent6edd7ca1624f89c9a36067b721a0280e748acb17 (diff)
login: track login class (i.e. one of "user", "greeter", "lock-screen") for each session
This introduces the new PAM environment variable XDG_SESSION_CLASS. If not set, defaults to "user". This is useful for apps that want to distuingish real user logins from "fake" ones which just exist to show a gdm login screen or a lock screen.
Diffstat (limited to 'src/login/logind-session.h')
-rw-r--r--src/login/logind-session.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/login/logind-session.h b/src/login/logind-session.h
index 8e394ac0d8..d0b8c87fab 100644
--- a/src/login/logind-session.h
+++ b/src/login/logind-session.h
@@ -38,6 +38,14 @@ typedef enum SessionType {
_SESSION_TYPE_INVALID = -1
} SessionType;
+typedef enum SessionClass {
+ SESSION_USER,
+ SESSION_GREETER,
+ SESSION_LOCK_SCREEN,
+ _SESSION_CLASS_MAX,
+ _SESSION_CLASS_INVALID = -1
+} SessionClass;
+
typedef enum KillWho {
KILL_LEADER,
KILL_ALL,
@@ -50,6 +58,7 @@ struct Session {
char *id;
SessionType type;
+ SessionClass class;
char *state_file;
@@ -118,6 +127,9 @@ int session_send_lock(Session *s, bool lock);
const char* session_type_to_string(SessionType t);
SessionType session_type_from_string(const char *s);
+const char* session_class_to_string(SessionClass t);
+SessionClass session_class_from_string(const char *s);
+
const char *kill_who_to_string(KillWho k);
KillWho kill_who_from_string(const char *s);