Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetSddlForm()

string System.Security.AccessControl.GenericSecurityDescriptor.GetSddlForm ( AccessControlSections includeSections)
inlineinherited

Definition at line 78 of file GenericSecurityDescriptor.cs.

79 {
80 byte[] binaryForm = new byte[BinaryLength];
81 GetBinaryForm(binaryForm, 0);
82 SecurityInfos securityInfos = (SecurityInfos)0;
83 if ((includeSections & AccessControlSections.Owner) != 0)
84 {
85 securityInfos |= SecurityInfos.Owner;
86 }
87 if ((includeSections & AccessControlSections.Group) != 0)
88 {
89 securityInfos |= SecurityInfos.Group;
90 }
91 if ((includeSections & AccessControlSections.Audit) != 0)
92 {
93 securityInfos |= SecurityInfos.SystemAcl;
94 }
95 if ((includeSections & AccessControlSections.Access) != 0)
96 {
97 securityInfos |= SecurityInfos.DiscretionaryAcl;
98 }
99 string resultSddl;
100 switch (Win32.ConvertSdToSddl(binaryForm, 1, securityInfos, out resultSddl))
101 {
102 case 87:
103 case 1305:
104 throw new InvalidOperationException();
105 default:
106 throw new InvalidOperationException();
107 case 0:
108 return resultSddl;
109 }
110 }

References System.Security.AccessControl.GenericSecurityDescriptor.BinaryLength, System.Security.AccessControl.Win32.ConvertSdToSddl(), and System.Security.AccessControl.GenericSecurityDescriptor.GetBinaryForm().

Referenced by System.Security.AccessControl.ObjectSecurity< T >.GetSecurityDescriptorSddlForm().