Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / IO / MemoryMappedFiles / MemoryMappedFileSecurity.cs / 1305376 / MemoryMappedFileSecurity.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: MemoryMappedFileSecurity ** ** Purpose: Managed ACL wrapper for MemoryMappedFiles. ** ** Date: February 7, 2007 ** ===========================================================*/ using System; using System.Runtime.InteropServices; using System.Security.AccessControl; using System.Security.Permissions; using System.Security.Principal; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; namespace System.IO.MemoryMappedFiles { [Flags] public enum MemoryMappedFileRights { // These correspond to win32 FILE_MAP_XXX constants // No None field - An ACE with the value 0 cannot grant nor deny. CopyOnWrite = 0x000001, Write = 0x000002, Read = 0x000004, Execute = 0x000008, Delete = 0x010000, ReadPermissions = 0x020000, ChangePermissions = 0x040000, TakeOwnership = 0x080000, //Synchronize = Not supported by memory mapped files ReadWrite = Read | Write, ReadExecute = Read | Execute, ReadWriteExecute = Read | Write | Execute, FullControl = CopyOnWrite | Read | Write | Execute | Delete | ReadPermissions | ChangePermissions | TakeOwnership, AccessSystemSecurity = 0x01000000, // Allow changes to SACL } public class MemoryMappedFileSecurity : ObjectSecurity{ public MemoryMappedFileSecurity() : base(false, ResourceType.KernelObject) { } [System.Security.SecuritySafeCritical] internal MemoryMappedFileSecurity(SafeMemoryMappedFileHandle safeHandle, AccessControlSections includeSections ) : base(false, ResourceType.KernelObject, safeHandle, includeSections) { } [System.Security.SecuritySafeCritical] internal void PersistHandle(SafeHandle handle) { Persist(handle); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: MemoryMappedFileSecurity ** ** Purpose: Managed ACL wrapper for MemoryMappedFiles. ** ** Date: February 7, 2007 ** ===========================================================*/ using System; using System.Runtime.InteropServices; using System.Security.AccessControl; using System.Security.Permissions; using System.Security.Principal; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; namespace System.IO.MemoryMappedFiles { [Flags] public enum MemoryMappedFileRights { // These correspond to win32 FILE_MAP_XXX constants // No None field - An ACE with the value 0 cannot grant nor deny. CopyOnWrite = 0x000001, Write = 0x000002, Read = 0x000004, Execute = 0x000008, Delete = 0x010000, ReadPermissions = 0x020000, ChangePermissions = 0x040000, TakeOwnership = 0x080000, //Synchronize = Not supported by memory mapped files ReadWrite = Read | Write, ReadExecute = Read | Execute, ReadWriteExecute = Read | Write | Execute, FullControl = CopyOnWrite | Read | Write | Execute | Delete | ReadPermissions | ChangePermissions | TakeOwnership, AccessSystemSecurity = 0x01000000, // Allow changes to SACL } public class MemoryMappedFileSecurity : ObjectSecurity { public MemoryMappedFileSecurity() : base(false, ResourceType.KernelObject) { } [System.Security.SecuritySafeCritical] internal MemoryMappedFileSecurity(SafeMemoryMappedFileHandle safeHandle, AccessControlSections includeSections ) : base(false, ResourceType.KernelObject, safeHandle, includeSections) { } [System.Security.SecuritySafeCritical] internal void PersistHandle(SafeHandle handle) { Persist(handle); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextFormatter.cs
- DrawTreeNodeEventArgs.cs
- InternalDispatchObject.cs
- IResourceProvider.cs
- DebugHandleTracker.cs
- FreezableOperations.cs
- XmlTextReader.cs
- AdapterDictionary.cs
- DataGridViewCellStyleEditor.cs
- JapaneseCalendar.cs
- RSAPKCS1KeyExchangeFormatter.cs
- SignatureToken.cs
- ChangeTracker.cs
- ToolStripArrowRenderEventArgs.cs
- StylusTip.cs
- DataGridViewCellParsingEventArgs.cs
- HttpServerVarsCollection.cs
- XmlSchemaDocumentation.cs
- InternalConfigEventArgs.cs
- InternalTypeHelper.cs
- ForwardPositionQuery.cs
- HttpProfileGroupBase.cs
- DirectoryLocalQuery.cs
- MiniModule.cs
- DiscoveryDocumentLinksPattern.cs
- TableChangeProcessor.cs
- ExceptionWrapper.cs
- SrgsGrammar.cs
- InkSerializer.cs
- BookmarkInfo.cs
- SurrogateSelector.cs
- ControlCachePolicy.cs
- LocalizableAttribute.cs
- DbConnectionInternal.cs
- LocalizedNameDescriptionPair.cs
- shaperfactoryquerycacheentry.cs
- TransactionFormatter.cs
- CfgParser.cs
- XmlCharacterData.cs
- InkPresenterAutomationPeer.cs
- NaturalLanguageHyphenator.cs
- ManagementDateTime.cs
- odbcmetadatacollectionnames.cs
- PolicyImporterElementCollection.cs
- ProgressBar.cs
- EventRouteFactory.cs
- ScrollPatternIdentifiers.cs
- OracleDateTime.cs
- ResourceCategoryAttribute.cs
- CreateUserErrorEventArgs.cs
- DoubleLinkListEnumerator.cs
- IndentedWriter.cs
- DeflateStreamAsyncResult.cs
- parserscommon.cs
- SmiEventSink_Default.cs
- InArgumentConverter.cs
- GenerateTemporaryTargetAssembly.cs
- EventLogPermissionEntry.cs
- infer.cs
- OleDbDataAdapter.cs
- DropDownList.cs
- Accessible.cs
- UserControlParser.cs
- SectionRecord.cs
- ColumnBinding.cs
- ToolStripTemplateNode.cs
- MediaContext.cs
- HtmlElementCollection.cs
- CapabilitiesAssignment.cs
- EventMap.cs
- SoapMessage.cs
- ScriptBehaviorDescriptor.cs
- Rss20FeedFormatter.cs
- InstanceKeyView.cs
- PropertyManager.cs
- XmlDocumentType.cs
- nulltextcontainer.cs
- TrackingQuery.cs
- UpdateExpressionVisitor.cs
- DoubleConverter.cs
- TextFindEngine.cs
- WinEventTracker.cs
- AuthenticationModuleElement.cs
- wmiprovider.cs
- PageCatalogPart.cs
- GradientStopCollection.cs
- SHA256.cs
- BamlTreeUpdater.cs
- SecurityKeyIdentifier.cs
- XmlChildEnumerator.cs
- TextTreeTextBlock.cs
- webbrowsersite.cs
- IpcClientChannel.cs
- odbcmetadatacolumnnames.cs
- FormsAuthenticationEventArgs.cs
- BamlResourceSerializer.cs
- PerformanceCounterPermissionAttribute.cs
- Baml6Assembly.cs
- Comparer.cs
- NameValuePermission.cs