]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-login: always return two arrays of same length from sd_seat_get_sessions
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 May 2017 00:48:09 +0000 (20:48 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 May 2017 01:59:09 +0000 (21:59 -0400)
commitcc6182e8540a348c664bcbb4af85701ddc36e5a6
treec8822cf49090dd2889d0b1e042a29f387ca13d30
parentd3cfab3148de482649e22d9dbbfec6e967a80856
sd-login: always return two arrays of same length from sd_seat_get_sessions

sd_seat_get_sessions returns two arrays, that in principle should always match:
the session names and corresponding uids. The second array could be shorter only
if parsing or uid conversion fails. But in that case there is no way to tell
*which* uid is wrong, so they are *all* useless. It's better to simplify things and
just return an error if parsing fails.
man/sd_seat_get_active.xml
src/libsystemd/sd-login/sd-login.c