Use Environment.TickCount64 instead of Datetime.Now as the random seed for AppLocker test file content (#14283)

This commit is contained in:
Ilya
2020-12-04 09:24:42 -08:00
committed by GitHub
parent 18b50e80ef
commit ea3036dc6d
@@ -230,7 +230,7 @@ namespace System.Management.Automation.Security
// AppLocker fails when you try to check a policy on a file
// with no content. So create a scratch file and test on that.
string dtAppLockerTestFileContents = AppLockerTestFileContents + DateTime.Now;
string dtAppLockerTestFileContents = AppLockerTestFileContents + Environment.TickCount64;
IO.File.WriteAllText(testPathScript, dtAppLockerTestFileContents);
IO.File.WriteAllText(testPathModule, dtAppLockerTestFileContents);
}