Ejemplo n.º 1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="config"> Configuration.</param>
 /// <param name="fingerprintVersion">The fingerprint version.</param>
 /// <param name="fingerprintSalt">The extra, optional fingerprint salt.</param>
 /// <param name="searchPathToolsHash">The extra, optional salt of path fragments of tool locations for tools using search path enumeration.</param>
 public ExtraFingerprintSalts(
     IConfiguration config,
     PipFingerprintingVersion fingerprintVersion,
     string fingerprintSalt,
     ContentHash?searchPathToolsHash)
     : this(
         config.Sandbox.UnsafeSandboxConfiguration.IgnoreSetFileInformationByHandle,
         config.Sandbox.UnsafeSandboxConfiguration.IgnoreZwRenameFileInformation,
         config.Sandbox.UnsafeSandboxConfiguration.IgnoreZwOtherFileInformation,
         config.Sandbox.UnsafeSandboxConfiguration.IgnoreNonCreateFileReparsePoints,
         config.Sandbox.UnsafeSandboxConfiguration.IgnoreReparsePoints,
         config.Sandbox.UnsafeSandboxConfiguration.IgnorePreloadedDlls,
         config.Sandbox.UnsafeSandboxConfiguration.IgnoreGetFinalPathNameByHandle,
         config.Sandbox.UnsafeSandboxConfiguration.ExistingDirectoryProbesAsEnumerations,
         config.Sandbox.UnsafeSandboxConfiguration.DisableDetours(),
         config.Sandbox.UnsafeSandboxConfiguration.MonitorNtCreateFile,
         config.Sandbox.UnsafeSandboxConfiguration.MonitorZwCreateOpenQueryFile,
         config.Sandbox.UnsafeSandboxConfiguration.MonitorFileAccesses,
         config.Sandbox.UnsafeSandboxConfiguration.UnexpectedFileAccessesAreErrors,
         config.Sandbox.MaskUntrackedAccesses,
         config.Sandbox.NormalizeReadTimestamps,
         config.Distribution.ValidateDistribution,
         ArePipWarningsPromotedToErrors(config.Logging),
         fingerprintVersion,
         fingerprintSalt,
         searchPathToolsHash,
         requiredKextVersionNumber : s_requiredKextVersionNumber
         )
 {
 }
Ejemplo n.º 2
0
#pragma warning disable CS1572
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="ignoreSetFileInformationByHandle">Whether the /unsafe_IgnoreSetFileInformationByHandle was passed to BuildXL.</param>
        /// <param name="ignoreZwRenameFileInformation">Whether the /unsafe_IgnoreZwRenameFileInformation was passed to BuildXL.</param>
        /// <param name="ignoreZwOtherFileInformation">Whether the /unsafe_IgnoreZwOtherFileInformation was passed to BuildXL.</param>
        /// <param name="ignoreNonCreateFileReparsePoints">Whether symlinks are followed for any other than CreateFile APIs.</param>
        /// <param name="ignoreReparsePoints">Whether the /unsafe_IgnoreReparsePoints was passed to BuildXL.</param>
        /// <param name="ignoreFullReparsePointResolving">Whether the /unsafe_IgnoreFullReparsePointResolving was passed to BuildXL.</param>
        /// <param name="ignorePreloadedDlls">Whether the /unsafe_IgnorePreloadedDlls was passed to BuildXL.</param>
        /// <param name="ignoreGetFinalPathNameByHandle">Whether the /unsafe_IgnoreGetFinalPathNameByHandle was passed to BuildXL.</param>
        /// <param name="existingDirectoryProbesAsEnumerations">Whether the /unsafe_ExistingDirectoryProbesAsEnumerations was passed to BuildXL.</param>
        /// <param name="disableDetours">Whether the /unsafe_DisableDetours was passed to BuildXL.</param>
        /// <param name="monitorNtCreateFile">Whether the NtCreateFile is detoured.</param>
        /// <param name="monitorZwCreateOpenQueryFile">Whether the ZwCreateOpenQueryFile is detoured.</param>
        /// <param name="monitorFileAccesses">Whether BuildXL monitors file accesses.</param>
        /// <param name="unexpectedFileAccessesAreErrors">Whether /unsafe_unexpectedFileAccessesAreErrors was passed to BuildXL.</param>
        /// <param name="maskUntrackedAccesses">Whether /maskUntrackedAccesses is enabled.</param>
        /// <param name="normalizeReadTimestamps">Whether /normalizeReadTimestamps is enabled.</param>
        /// <param name="validateDistribution">Whether /validateDistribution is enabled.</param>
        /// <param name="pipWarningsPromotedToErrors">Whether pip warnings are promoted to errors via the command line configuration</param>
        /// <param name="fingerprintVersion">The fingerprint version.</param>
        /// <param name="fingerprintSalt">The extra, optional fingerprint salt.</param>
        /// <param name="searchPathToolsHash">The extra, optional salt of path fragments of tool locations for tools using search path enumeration.</param>
        /// <param name="requiredKextVersionNumber">The required kernel extension version number.</param>
        /// <param name="explicitlyReportDirectoryProbes">Whether /unsafe_explicitlyReportDirectoryProbes was passed to BuildXL.</param>
        public ExtraFingerprintSalts(
            bool ignoreSetFileInformationByHandle,
            bool ignoreZwRenameFileInformation,
            bool ignoreZwOtherFileInformation,
            bool ignoreNonCreateFileReparsePoints,
            bool ignoreReparsePoints,
            bool ignoreFullReparsePointResolving,
            bool ignorePreloadedDlls,
            bool ignoreGetFinalPathNameByHandle,
            bool existingDirectoryProbesAsEnumerations,
            bool disableDetours,
            bool monitorNtCreateFile,
            bool monitorZwCreateOpenQueryFile,
            bool monitorFileAccesses,
            bool unexpectedFileAccessesAreErrors,
            bool maskUntrackedAccesses,
            bool normalizeReadTimestamps,
            bool validateDistribution,
            bool pipWarningsPromotedToErrors,
            PipFingerprintingVersion fingerprintVersion,
            string fingerprintSalt,
            ContentHash?searchPathToolsHash,
            string requiredKextVersionNumber,
            bool explicitlyReportDirectoryProbes
            )
        {
            IgnoreSetFileInformationByHandle = ignoreSetFileInformationByHandle;
            IgnoreZwRenameFileInformation    = ignoreZwRenameFileInformation;
            IgnoreZwOtherFileInformation     = ignoreZwOtherFileInformation;
            IgnoreNonCreateFileReparsePoints = ignoreNonCreateFileReparsePoints;
            IgnoreReparsePoints                   = ignoreReparsePoints;
            IgnoreFullReparsePointResolving       = ignoreFullReparsePointResolving;
            IgnorePreloadedDlls                   = ignorePreloadedDlls;
            ExistingDirectoryProbesAsEnumerations = existingDirectoryProbesAsEnumerations;
            DisableDetours                  = disableDetours;
            MonitorNtCreateFile             = monitorNtCreateFile;
            MonitorZwCreateOpenQueryFile    = monitorZwCreateOpenQueryFile;
            MonitorFileAccesses             = monitorFileAccesses;
            UnexpectedFileAccessesAreErrors = unexpectedFileAccessesAreErrors;
            MaskUntrackedAccesses           = maskUntrackedAccesses;
            NormalizeReadTimestamps         = normalizeReadTimestamps;
            ValidateDistribution            = validateDistribution;
            FingerprintVersion              = fingerprintVersion;
            FingerprintSalt                 = fingerprintSalt + EngineEnvironmentSettings.DebugFingerprintSalt;
            SearchPathToolsHash             = searchPathToolsHash;
            IgnoreGetFinalPathNameByHandle  = ignoreGetFinalPathNameByHandle;
            PipWarningsPromotedToErrors     = pipWarningsPromotedToErrors;
            RequiredKextVersionNumber       = requiredKextVersionNumber;
            m_calculatedSaltsFingerprint    = null;
            ExplicitlyReportDirectoryProbes = explicitlyReportDirectoryProbes;
        }