core/execute: pass the username to utmp/wtmp database
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 3 Feb 2017 16:32:42 +0000 (11:32 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 3 Feb 2017 16:49:43 +0000 (11:49 -0500)
commit6a93917df9c8c852387d71004ccb43b33da962cd
treed9292df05042b9c4c5e1d1ac83b1a7c46a3202d7
parent8b89628a10af3863bfc97872912e9da4076a5929
core/execute: pass the username to utmp/wtmp database

Before previous commit, username would be NULL for root, and set only
for other users. So the argument passed to utmp_put_init_process()
would be "root" for other users and NULL for root. Seems strange.
Instead, always pass the username if available.
src/core/execute.c