Repository navigation
Add asynchronous overload of WindowsIdentity.RunImpersonated - #1152
Conversation
|
@ViktorHofer @safern is this expected?Am I missing something?Maybe worflow is changed a bit And after |
|
/azp list |
|
Commenter does not have sufficient privileges for PR 1152 in repo dotnet/runtime |
I believe this is a bug introduced when moving the corefx testing targets from arcade into the consolidated repo. I believe we should condition this line to only execute when |
Actually it seems like the <PropertyGroup>
<!-- Lowest supported version -->
<XunitConsolePath>$(MSBuildThisFileDirectory)..\tools\net452\xunit.console.exe</XunitConsolePath>
<XunitConsolePathX86>$(MSBuildThisFileDirectory)..\tools\net452\xunit.console.x86.exe</XunitConsolePathX86>
<!-- Version specific -->
<XunitConsole452Path>$(MSBuildThisFileDirectory)..\tools\net452\xunit.console.exe</XunitConsole452Path>
<XunitConsole452PathX86>$(MSBuildThisFileDirectory)..\tools\net452\xunit.console.x86.exe</XunitConsole452PathX86>
<XunitConsole46Path>$(MSBuildThisFileDirectory)..\tools\net46\xunit.console.exe</XunitConsole46Path>
<XunitConsole46PathX86>$(MSBuildThisFileDirectory)..\tools\net46\xunit.console.x86.exe</XunitConsole46PathX86>
<XunitConsole461Path>$(MSBuildThisFileDirectory)..\tools\net461\xunit.console.exe</XunitConsole461Path>
<XunitConsole461PathX86>$(MSBuildThisFileDirectory)..\tools\net461\xunit.console.x86.exe</XunitConsole461PathX86>
<XunitConsole462Path>$(MSBuildThisFileDirectory)..\tools\net462\xunit.console.exe</XunitConsole462Path>
<XunitConsole462PathX86>$(MSBuildThisFileDirectory)..\tools\net462\xunit.console.x86.exe</XunitConsole462PathX86>
<XunitConsole47Path>$(MSBuildThisFileDirectory)..\tools\net47\xunit.console.exe</XunitConsole47Path>
<XunitConsole47PathX86>$(MSBuildThisFileDirectory)..\tools\net47\xunit.console.x86.exe</XunitConsole47PathX86>
<XunitConsole471Path>$(MSBuildThisFileDirectory)..\tools\net471\xunit.console.exe</XunitConsole471Path>
<XunitConsole471PathX86>$(MSBuildThisFileDirectory)..\tools\net471\xunit.console.x86.exe</XunitConsole471PathX86>
<XunitConsole472Path>$(MSBuildThisFileDirectory)..\tools\net472\xunit.console.exe</XunitConsole472Path>
<XunitConsole472PathX86>$(MSBuildThisFileDirectory)..\tools\net472\xunit.console.x86.exe</XunitConsole472PathX86>
<!-- Lowest supported version -->
<XunitConsoleNetCoreAppPath>$(MSBuildThisFileDirectory)..\tools\netcoreapp1.0\xunit.console.dll</XunitConsoleNetCoreAppPath>
<!-- Version specific -->
<XunitConsoleNetCore1AppPath>$(MSBuildThisFileDirectory)..\tools\netcoreapp1.0\xunit.console.dll</XunitConsoleNetCore1AppPath>
<XunitConsoleNetCore2AppPath>$(MSBuildThisFileDirectory)..\tools\netcoreapp2.0\xunit.console.dll</XunitConsoleNetCore2AppPath>
</PropertyGroup> |
|
/azp list |
|
Commenter does not have sufficient privileges for PR 1152 in repo dotnet/runtime |
@safern this is a custom property defined in our own xunit console runner: https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.XUnitConsoleRunner/src/build/Microsoft.DotNet.XUnitConsoleRunner.props#L4. I assume this isn't working because netcoreapp wasn't restored correctly or the design time imports failed for some reason. To guard against that we should add |
|
Submitted #1715 to guard against such case. |
update comment
update comment
Fix comment
fix comment
| } | ||
|
|
||
| /// <summary> | ||
| /// Runs the specified asynchronous action as the impersonated Windows identity |
There was a problem hiding this comment.
| /// Runs the specified asynchronous action as the impersonated Windows identity | |
| /// Runs the specified asynchronous action as the impersonated Windows identity. |
| => RunImpersonated(safeAccessTokenHandle, func); | ||
|
|
||
| /// <summary> | ||
| /// Runs the specified asynchronous action as the impersonated Windows identity |
There was a problem hiding this comment.
| /// Runs the specified asynchronous action as the impersonated Windows identity | |
| /// Runs the specified asynchronous action as the impersonated Windows identity. |
closes https://github.com/dotnet/corefx/issues/24977
On issue there is
#nullable enableon review comment, but I don't know what it mean, this namespaces seem not annotated yet.At the moment there is not "real" test on "another" user token, I've added some plumbing to test with new win user, took idea from https://github.com/dotnet/runtime/blob/4f9ae42d861fcb4be2fcd5d3d55d5f227d30e723/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.Windows.cs maybe we could at the end merge helper inside Common.
Let me know if it's too much and I'll remove all and will add only simple "same access token current user" test.
Folded two api test in one to reuse assertions and also because the test are pretty the same.
cc: @stephentoub @bartonjs @GrabYourPitchforks
Merry Christmas to all team!