summaryrefslogtreecommitdiff
path: root/src/login/logind.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-09 16:14:19 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-09 18:35:36 +0100
commit309a29dfd24f4175de334ca1593e3fe2436ab082 (patch)
treead38b8a702fcde2b5a82d07ecf130e3ffd952268 /src/login/logind.h
parent3909ba34ec9b2c63d9938b6ba37af54a214fcff3 (diff)
logind: when a bus call is done on a session, user or seat, optionally determine them from the caller credentials
More specifically, if an operation is requested on a session with an empty name, the caller's session is used. If an operation is requested on a seat with an empty name, the seat of the caller's session is used. Finally, if an operation on the user with UID -1 is requested, the user of the client's session is used (and not the UID of the client!).
Diffstat (limited to 'src/login/logind.h')
-rw-r--r--src/login/logind.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/login/logind.h b/src/login/logind.h
index 2f76572580..e0cb7d0238 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -193,3 +193,7 @@ void manager_drop_busname(Manager *manager, const char *name);
int manager_set_lid_switch_ignore(Manager *m, usec_t until);
int config_parse_tmpfs_size(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+
+int manager_get_session_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Session **ret);
+int manager_get_user_from_creds(Manager *m, sd_bus_message *message, uid_t uid, sd_bus_error *error, User **ret);
+int manager_get_seat_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Seat **ret);