< Summary

Class:SharpHoundRPC.LSANative.LSAStructs
Assembly:SharpHoundRPC
File(s):D:\a\SharpHoundCommon\SharpHoundCommon\src\SharpHoundRPC\LSANative\LSAStructs.cs
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:57
Line coverage:0% (0 of 6)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
Dispose()0%200%

File(s)

D:\a\SharpHoundCommon\SharpHoundCommon\src\SharpHoundRPC\LSANative\LSAStructs.cs

#LineLine coverage
 1using System;
 2using System.Runtime.InteropServices;
 3using SharpHoundRPC.Shared;
 4
 5namespace SharpHoundRPC.LSANative
 6{
 7    public class LSAStructs
 8    {
 9        [StructLayout(LayoutKind.Sequential)]
 10        public struct ObjectAttributes
 11        {
 12            public int Length;
 13            public IntPtr RootDirectory;
 14            public IntPtr ObjectName;
 15            public int Attributes;
 16            public IntPtr SecurityDescriptor;
 17            public IntPtr SecurityQualityOfService;
 18
 19            public void Dispose()
 020            {
 021                if (ObjectName == IntPtr.Zero) return;
 022                Marshal.DestroyStructure(ObjectName, typeof(SharedStructs.UnicodeString));
 023                Marshal.FreeHGlobal(ObjectName);
 024                ObjectName = IntPtr.Zero;
 025            }
 26        }
 27
 28        [StructLayout(LayoutKind.Sequential)]
 29        public struct PolicyAccountDomainInfo
 30        {
 31            public SharedStructs.UnicodeString DomainName;
 32            public IntPtr DomainSid;
 33        }
 34
 35        [StructLayout(LayoutKind.Sequential)]
 36        public struct LSATranslatedNames
 37        {
 38            public SharedEnums.SidNameUse Use;
 39            public SharedStructs.UnicodeString Name;
 40            public int DomainIndex;
 41        }
 42
 43        [StructLayout(LayoutKind.Sequential)]
 44        public struct LSAReferencedDomains
 45        {
 46            public int Entries;
 47            public IntPtr Domains;
 48        }
 49
 50        [StructLayout(LayoutKind.Sequential)]
 51        public struct LSATrustInformation
 52        {
 53            public SharedStructs.UnicodeString Name;
 54            public IntPtr Sid;
 55        }
 56    }
 57}

Methods/Properties

Dispose()