diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-11-26 05:05:00 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-11-26 05:05:00 +0100 |
commit | baae0358f349870544884e405e82e4be7d8add9f (patch) | |
tree | a2a49e29f8c3360de7f671031b09334bfcc176a6 /src/login/logind-dbus.c | |
parent | 898d5c913733d869820f85422a903da0f0685c6c (diff) |
pam_systemd: do not set XDG_RUNTIME_DIR if the session's original user is not the same as the newly logged in one
It's better not to set any XDG_RUNTIME_DIR at all rather than one of a
different user. So let's do this.
This changes the bus call parameters of CreateSession(), but that is
explicitly an internal API hence should be fine. Note however, that a
logind restart (the way the RPM postinst scriptlets do it) is necessary
to make things work again.
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r-- | src/login/logind-dbus.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index a52b00181d..a972d93774 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -568,11 +568,12 @@ static int method_create_session(sd_bus *bus, sd_bus_message *message, void *use return -ENOMEM; return sd_bus_reply_method_return( - message, "soshsub", + message, "soshusub", session->id, path, session->user->runtime_path, fifo_fd, + (uint32_t) session->user->uid, session->seat ? session->seat->id : "", (uint32_t) session->vtnr, true); @@ -1855,7 +1856,7 @@ const sd_bus_vtable manager_vtable[] = { SD_BUS_METHOD("ListUsers", NULL, "a(uso)", method_list_users, 0), SD_BUS_METHOD("ListSeats", NULL, "a(so)", method_list_seats, 0), SD_BUS_METHOD("ListInhibitors", NULL, "a(ssssuu)", method_list_inhibitors, 0), - SD_BUS_METHOD("CreateSession", "uussssussbssa(sv)", "soshsub", method_create_session, 0), + SD_BUS_METHOD("CreateSession", "uussssussbssa(sv)", "soshusub", method_create_session, 0), SD_BUS_METHOD("ReleaseSession", "s", NULL, method_release_session, 0), SD_BUS_METHOD("ActivateSession", "s", NULL, method_activate_session, 0), SD_BUS_METHOD("ActivateSessionOnSeat", "ss", NULL, method_activate_session_on_seat, 0), |