Documentation
¶
Index ¶
- func CutAces(aclStr string) ([]string, error)
- func CutSDDL(sddlString string) (string, string, []string, []string, error)
- func NtSecurityDescriptortoSDDL(ntsd *securitydescriptor.NtSecurityDescriptor) (string, error)
- func SDDLtoNtSecurityDescriptor(sddlString string) (*securitydescriptor.NtSecurityDescriptor, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CutAces ¶
CutAces extracts individual ACE strings from a DACL/SACL component. Handles the format: flags(ace1)(ace2)...(aceN)
Nested parentheses inside an ACE (for example in a conditional expression) are preserved: only top-level parentheses delimit ACEs. Unbalanced parentheses and stray characters between or after ACEs are reported as an error rather than silently dropping or truncating ACEs.
func CutSDDL ¶
CutSDDL parses an SDDL string into its component parts.
The scan is parenthesis-aware: the O:, G:, D:, and S: component markers are only recognised at the top level (parenthesis depth 0), so a ':' or a marker letter appearing inside an ACE body (for example in a conditional or resource-attribute ACE) does not split the string. Malformed input — leading characters before the first marker, or unbalanced parentheses — is reported as an error instead of being silently discarded.
Parameters:
- sddlString (string): The SDDL string to parse.
Returns:
- (string, string, []string, []string, error): The owner SID, group SID, DACL ACEs, SACL ACEs, and an error if the string is malformed.
func NtSecurityDescriptortoSDDL ¶
func NtSecurityDescriptortoSDDL(ntsd *securitydescriptor.NtSecurityDescriptor) (string, error)
NtSecurityDescriptortoSDDL converts an NtSecurityDescriptor to an SDDL string.
Parameters:
- ntsd (*securitydescriptor.NtSecurityDescriptor): The security descriptor to convert.
Returns:
- (string, error): The SDDL string representation and any error that occurred.
func SDDLtoNtSecurityDescriptor ¶
func SDDLtoNtSecurityDescriptor(sddlString string) (*securitydescriptor.NtSecurityDescriptor, error)
SDDLtoNtSecurityDescriptor converts an SDDL string to an NtSecurityDescriptor.
Parameters:
- sddlString (string): The SDDL string to convert.
Returns:
- (*securitydescriptor.NtSecurityDescriptor, error): The converted security descriptor and any error that occurred.
Types ¶
This section is empty.