winacl

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package winacl holds the Windows ACL helpers behind securefile: the caller's SIDs, the private descriptor that stands in for 0600, and the check that a DACL exposes nobody else, which reads the DACL through the SDDL parser in sddl.go.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDACL = errors.New("no DACL")

Functions

This section is empty.

Types

type ACE

type ACE struct {
	Type  string // "A" allow, "D" deny, "OA" object allow, ...
	Flags string // two-letter codes: "OI", "CI", "IO", "ID", ...
	Mask  uint32
	SID   string // "S-1-5-..." or an alias such as "BA", for windows.StringToSid
}

ACE is one ACE of a DACL in SDDL, as ConvertSecurityDescriptorToStringSecurityDescriptor writes it.

func ParseDACL

func ParseDACL(sddl string) ([]ACE, error)

ParseDACL returns the entries of a descriptor that holds only a DACL, rendered as "D:<flags>(ace)(ace)...". A NULL DACL, which grants everyone everything, is ErrNoDACL. Anything else it does not expect is an error too, so the caller fails closed: other sections, and conditional ACEs, whose expressions it does not read.

func (ACE) InheritOnly

func (a ACE) InheritOnly() bool

InheritOnly reports whether the ACE applies to children only.

Jump to

Keyboard shortcuts

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