w -sf and w -si segfault when systemd support is enabled
To reproduce: configure with systemd support, and run w -sf or w -si.
My attempt at diagnosing the issue:
- On line 831,
showinfois called with utmp =NULL - On line 622,
print_fromis called with session =NULL - With neither utmp or session,
print_fromdereferences a null pointer
I'm not too familiar with the code base, but a conditional check to pass the session like on line 581 might fix the issue.