utmp entries for NoMachine are not cleaned up
Entries in /var/run/utmp for NoMachine are not cleaned up when the session is reconnected.
When looking at utmp, the 'w' command reports multiple entries like:
nxtest nx:1002 nx:1002 10:56 0.00s 0.00s 1.29s /usr/NX/bin/nxserver.bin -c /etc/NX/nxserver --login -H 5
even if there is just one reconnected session.
This issue occurs when sessreg is enabled in server.cfg:
CommandSessreg /usr/bin/sessreg
To reproduce the problem, start a session, disconnect and reconnect it several times and check utmp by the w command. Utmp entries are cleaned up only when the user logs out of the NoMachine session.
