From 309a29dfd24f4175de334ca1593e3fe2436ab082 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 9 Jan 2015 16:14:19 +0100 Subject: 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!). --- src/login/logind.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/login/logind.h') 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); -- cgit v1.2.3-54-g00ecf