Clear autologon credentials on session log-on #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The method we use to auto log-in the gamer and tournament accounts is a huge hack that relies on a side-effect we introduce in the windows registry, altering the behaviour of winlogon. Up until now, the credentials were never cleared and only upserted when logging in new sessions.
This PR introduces a new message type the tray application can send to the service over the named pipe to instruct the service to clear the autologon credentials in the registry. Currently, this will be performed on launch of the tray app (i.e. once an interactive session logs in). This is a sensible default that will make sure the credentials are cleaned up pretty much as soon as possible. The only downside to this compared to the previous behaviour is that if a computer is rebooted during a play session, it will not auto-login again and resume the play session. This was never intended functionality and just a happy side-effect of the previous implementation. We could restore this behaviour by clearing the credentials only at the end of the session but I think this would be less reliable and prone to glitching.
Fixes #15