Imported Upstream version 4.3.2.467

Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
Xamarin Public Jenkins
2016-02-22 11:00:01 -05:00
parent f302175246
commit f3e3aab35a
4097 changed files with 122406 additions and 82300 deletions

View File

@@ -519,7 +519,7 @@ namespace System.Security
#if !FEATURE_PAL && FEATURE_IMPERSONATION
if (WindowsIdentity != null)
sc._windowsIdentity = new WindowsIdentity(WindowsIdentity.TokenHandle);
sc._windowsIdentity = new WindowsIdentity(WindowsIdentity.AccessToken);
#endif //!FEATURE_PAL && FEATURE_IMPERSONATION
if (_compressedStack != null)
@@ -539,7 +539,7 @@ namespace System.Security
#if !FEATURE_PAL && FEATURE_IMPERSONATION
if (this.WindowsIdentity != null)
sc._windowsIdentity = new WindowsIdentity(this.WindowsIdentity.TokenHandle);
sc._windowsIdentity = new WindowsIdentity(this.WindowsIdentity.AccessToken);
#endif //!FEATURE_PAL && FEATURE_IMPERSONATION
//
@@ -592,7 +592,7 @@ namespace System.Security
{
WindowsIdentity currentIdentity = GetCurrentWI(currThreadEC);
if (currentIdentity != null)
sc._windowsIdentity = new WindowsIdentity(currentIdentity.TokenHandle);
sc._windowsIdentity = new WindowsIdentity(currentIdentity.AccessToken);
}
else
{
@@ -685,7 +685,7 @@ namespace System.Security
if (targetWI != null)
{
SafeTokenHandle tokenHandle = targetWI.TokenHandle;
SafeAccessTokenHandle tokenHandle = targetWI.AccessToken;
if (tokenHandle != null && !tokenHandle.IsInvalid)
{
hr = Win32.ImpersonateLoggedOnUser(tokenHandle);