sddl

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CutAces

func CutAces(aclStr string) ([]string, error)

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

func CutSDDL(sddlString string) (string, string, []string, []string, error)

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.

Directories

Path Synopsis
ace

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL