Fix NetEventSource logging for Windows auth on Linux (dotnet/corefx#35918)
authorDavid Shulman <david.shulman@microsoft.com>
Sun, 10 Mar 2019 05:22:44 +0000 (21:22 -0800)
committerGitHub <noreply@github.com>
Sun, 10 Mar 2019 05:22:44 +0000 (21:22 -0800)
commit95d7642358379ee9bc99b72dfb7fba8acc806241
treec79f98cc9ee3f6f6c0b45d7335c4699703819b63
parent1f4f0f51e9a5f1d555e1e31acb4020b70b57bc77
Fix NetEventSource logging for Windows auth on Linux (dotnet/corefx#35918)

While debugging some Linux enterprise auth (Negotiate/NTLM) scenarios, I discovered that the
logging I added in PR dotnet/corefx#35383 wasn't working. This was due to not passing in a 'null' value
for the context object for NetEventSource.Info. It was using the string object as the
context object and not logging the string data.

As part of fixing that I optimized some code for remembering what auth package (NTLM
or SPNEGO) is used.

Commit migrated from https://github.com/dotnet/corefx/commit/21db29aeff8acafe080113856545d30246891da6
src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Unix.cs