Block switching to same user as an user occupying current seat
Switching to same user as the current user raises a abnormal behavior,
failing on re-login process. This is due to the inconsistance between
the tlm-sessiond daemon lifecycle and the systemd-logind's logout
procedure.
The standard solution is to receive a sessionTerminated signal from the
systemd-logind and sync it to the re-login procedure of TLM, but it
will take many structure changes of tlm-sessiond.
This patch just blocks switching to same user, preventing the abnormal
case with just a small effort.
* src/daemon/tlm-seat.c|h: tlm_seat_get_occupying_username() is added.
* src/daemon/tlm-dbus-observer.c: _is_valid_switch_user_dbus_request()
is added and used in _process_request().
In addition, several comments and debug logs are given.
Change-Id: I9238098771bcce2b40aa89da47e9391ff7556922