pgina/pgina — pull request #208 by weiss (2013-08-12 19:51:46+00:00)
Title: Use credentials provided by remote clients

If a remote client provides a username, fill in the corresponding field of the logon user interface (and focus the password field). If the client also provides a password, attempt an auto-login.

This patch works fine for us on Windows Server 2008 R2, but I see two possible caveats:

* As I [mentioned on the mailing list](https://groups.google.com/forum/#!topic/pgina-devel/DLDwueNMGuE "Mailing List Posting"), it might introduce a memory leak. The UpdateRemoteCredential callback allocates space for pcpcsOut->rgbSerialization, and it's not obvious to me whether I'm supposed to release that memory myself; and if so, where.
* According to [a forum thread on MSDN](http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/4134d896-85f5-460e-b621-c3b8acf3a1c9/credential-provider-icredentialprovidersetserialization-is-never-called "MSDN Forum Thread"), this implementation of the feature won't work on Windows releases older than Windows 7 or Server 2008 R2. However, the code shouldn't hurt these platforms, it will simply be unused.