Skip to content

Remove MapSecurityZoneWithUrlmon method and related code #7103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 25, 2018

Conversation

rjmholt
Copy link
Collaborator

@rjmholt rjmholt commented Jun 18, 2018

PR Summary

Fixes #6919: Removes the MapSecurityZoneWithUrlmon method and the native interface it uses.

MapSecurityZoneWithUrlmon uses an unsupported API call, and this ensures we use a supported API to improve quality.

PR Checklist

@rjmholt rjmholt requested review from daxian-dbw and TravisEz13 June 18, 2018 20:37
Copy link

@anmenaga anmenaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither "PR Summary" nor original issue have a description why this change is necessary.

@TravisEz13 TravisEz13 added the Compliance Related to compliance requirements label Jun 18, 2018
@TravisEz13
Copy link
Member

@anmenaga

Neither "PR Summary" nor original issue have a description why this change is necessary.

@rjmholt says in the summary

MapSecurityZoneWithUrlmon uses an unsupported API call, and this ensures we use a supported API to improve quality.

@@ -139,19 +139,11 @@ internal static SecurityZone GetFileSecurityZone(string filePath)
Diagnostics.Assert(Path.IsPathRooted(filePath), "Caller makes sure the path is rooted.");
Diagnostics.Assert(Utils.FileExists(filePath), "Caller makes sure the file exists.");
string sysRoot = System.Environment.GetEnvironmentVariable("SystemRoot");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is not used anymore.

@@ -448,60 +403,6 @@ private static class NativeMethods
internal static extern uint GetACP();

public const int S_OK = 0x00000000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this one still used anywhere?

@@ -448,60 +403,6 @@ private static class NativeMethods
internal static extern uint GetACP();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function doesn't seem to be used anymore.

@anmenaga
Copy link

@TravisEz13 "edited" after I posted the request. :)

@TravisEz13
Copy link
Member

@anmenaga I'm not sure you get notified of edits and the timing wasn't perfectly clear.

@rjmholt
Copy link
Collaborator Author

rjmholt commented Jun 21, 2018

Looks like the test failure is pwrshplugin.dll:

  Describing JEA session Get-Help test
    [-] Error occurred in Describe block 9.84s
      ItemNotFoundException: Cannot find path 'C:\projects\powershell\src\powershell-win-core\bin\Release
      etcoreapp2.1\win7-x64\publish\pwrshplugin.dll' because it does not exist.

@rjmholt
Copy link
Collaborator Author

rjmholt commented Jun 21, 2018

Not sure if that can be fixed in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compliance Related to compliance requirements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use MapSecurityZoneWithoutUrlmon and remove MapSecurityZoneWithUrlmon and related native code
4 participants