PipeSecurity.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. //
  2. // PipeSecurity.cs
  3. //
  4. // Author:
  5. // Atsushi Enomoto <[email protected]>
  6. //
  7. // Copyright (C) 2009 Novell, Inc. http://www.novell.com
  8. //
  9. // Permission is hereby granted, free of charge, to any person obtaining
  10. // a copy of this software and associated documentation files (the
  11. // "Software"), to deal in the Software without restriction, including
  12. // without limitation the rights to use, copy, modify, merge, publish,
  13. // distribute, sublicense, and/or sell copies of the Software, and to
  14. // permit persons to whom the Software is furnished to do so, subject to
  15. // the following conditions:
  16. //
  17. // The above copyright notice and this permission notice shall be
  18. // included in all copies or substantial portions of the Software.
  19. //
  20. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  21. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  22. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  23. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  24. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  25. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  26. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  27. //
  28. using System;
  29. using System.IO;
  30. using System.Linq;
  31. using System.Runtime.InteropServices;
  32. using System.Security.AccessControl;
  33. using System.Security.Permissions;
  34. using System.Security.Principal;
  35. namespace System.IO.Pipes
  36. {
  37. [MonoNotSupported ("ACL is not supported in Mono")]
  38. [HostProtection (SecurityAction.LinkDemand, MayLeakOnAbort = true)]
  39. public class PipeSecurity : NativeObjectSecurity
  40. {
  41. [MonoNotSupported ("ACL is not supported in Mono")]
  42. public PipeSecurity ()
  43. : base (false, ResourceType.FileObject)
  44. {
  45. throw new NotImplementedException ("ACL is not supported in Mono");
  46. }
  47. public override Type AccessRightType {
  48. get { return typeof (PipeAccessRights); }
  49. }
  50. public override Type AccessRuleType {
  51. get { return typeof (PipeAccessRule); }
  52. }
  53. public override Type AuditRuleType {
  54. get { return typeof (PipeAuditRule); }
  55. }
  56. [MonoNotSupported ("ACL is not supported in Mono")]
  57. public override AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
  58. {
  59. throw new NotImplementedException ("ACL is not supported in Mono");
  60. }
  61. [MonoNotSupported ("ACL is not supported in Mono")]
  62. public void AddAccessRule (PipeAccessRule rule)
  63. {
  64. throw new NotImplementedException ("ACL is not supported in Mono");
  65. }
  66. [MonoNotSupported ("ACL is not supported in Mono")]
  67. public void AddAuditRule (PipeAuditRule rule)
  68. {
  69. throw new NotImplementedException ("ACL is not supported in Mono");
  70. }
  71. [MonoNotSupported ("ACL is not supported in Mono")]
  72. public override sealed AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
  73. {
  74. throw new NotImplementedException ("ACL is not supported in Mono");
  75. }
  76. [MonoNotSupported ("ACL is not supported in Mono")]
  77. [SecurityPermission (SecurityAction.Assert, UnmanagedCode = true)]
  78. protected internal void Persist (SafeHandle handle)
  79. {
  80. throw new NotImplementedException ("ACL is not supported in Mono");
  81. }
  82. [MonoNotSupported ("ACL is not supported in Mono")]
  83. [SecurityPermission (SecurityAction.Assert, UnmanagedCode = true)]
  84. protected internal void Persist (string name)
  85. {
  86. throw new NotImplementedException ("ACL is not supported in Mono");
  87. }
  88. [MonoNotSupported ("ACL is not supported in Mono")]
  89. public bool RemoveAccessRule (PipeAccessRule rule)
  90. {
  91. throw new NotImplementedException ("ACL is not supported in Mono");
  92. }
  93. [MonoNotSupported ("ACL is not supported in Mono")]
  94. public void RemoveAccessRuleSpecific (PipeAccessRule rule)
  95. {
  96. throw new NotImplementedException ("ACL is not supported in Mono");
  97. }
  98. [MonoNotSupported ("ACL is not supported in Mono")]
  99. public bool RemoveAuditRule (PipeAuditRule rule)
  100. {
  101. throw new NotImplementedException ("ACL is not supported in Mono");
  102. }
  103. [MonoNotSupported ("ACL is not supported in Mono")]
  104. public void RemoveAuditRuleAll (PipeAuditRule rule)
  105. {
  106. throw new NotImplementedException ("ACL is not supported in Mono");
  107. }
  108. [MonoNotSupported ("ACL is not supported in Mono")]
  109. public void RemoveAuditRuleSpecific (PipeAuditRule rule)
  110. {
  111. throw new NotImplementedException ("ACL is not supported in Mono");
  112. }
  113. [MonoNotSupported ("ACL is not supported in Mono")]
  114. public void ResetAccessRule (PipeAccessRule rule)
  115. {
  116. throw new NotImplementedException ("ACL is not supported in Mono");
  117. }
  118. [MonoNotSupported ("ACL is not supported in Mono")]
  119. public void SetAccessRule (PipeAccessRule rule)
  120. {
  121. throw new NotImplementedException ("ACL is not supported in Mono");
  122. }
  123. [MonoNotSupported ("ACL is not supported in Mono")]
  124. public void SetAuditRule (PipeAuditRule rule)
  125. {
  126. throw new NotImplementedException ("ACL is not supported in Mono");
  127. }
  128. }
  129. }