internal static System.Security.AccessControl.AccessControlSections Convert(System.Security.AccessControl.SecurityInfos si) { System.Security.AccessControl.AccessControlSections ret = System.Security.AccessControl.AccessControlSections.None; if ((si & System.Security.AccessControl.SecurityInfos.SystemAcl) != 0) { ret |= System.Security.AccessControl.AccessControlSections.Audit; } if ((si & System.Security.AccessControl.SecurityInfos.DiscretionaryAcl) != 0) { ret |= System.Security.AccessControl.AccessControlSections.Access; } if ((si & System.Security.AccessControl.SecurityInfos.Group) != 0) { ret |= System.Security.AccessControl.AccessControlSections.Group; } if ((si & System.Security.AccessControl.SecurityInfos.Owner) != 0) { ret |= System.Security.AccessControl.AccessControlSections.Owner; } return(ret); }
internal static extern int SetNamedSecurityInfo(string objectName, SE_OBJECT_TYPE objectType, System.Security.AccessControl.SecurityInfos securityInfo, IntPtr sidOwner, IntPtr sidGroup, IntPtr dacl, IntPtr sacl);
internal static extern int GetNamedSecurityInfo(string objectName, SE_OBJECT_TYPE objectType, System.Security.AccessControl.SecurityInfos securityInfo, out IntPtr sidOwner, out IntPtr sidGroup, out IntPtr dacl, out IntPtr sacl, out IntPtr securityDescriptor);
static extern bool QueryServiceObjectSecurity( IntPtr serviceHandle, System.Security.AccessControl.SecurityInfos secInfo, byte[] lpSecDesrBuf, uint bufSize, out uint bufSizeNeeded);
static extern bool SetServiceObjectSecurity(SafeHandle serviceHandle, System.Security.AccessControl.SecurityInfos secInfos, byte[] lpSecDesrBuf);
static extern bool QueryServiceObjectSecurity(IntPtr serviceHandle, System.Security.AccessControl.SecurityInfos secInfo, ref SECURITY_DESCRIPTOR lpSecDesrBuf, uint bufSize, out uint bufSizeNeeded);