sddl

package
v10.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LiteralSIDRegex = regexp.MustCompile(`SID\(.*?\)`)
View Source
var StringRegex = regexp.MustCompile(`("")|(".*?[^\\]")`)

Functions

func IffInt

func IffInt(condition bool, tVal, fVal int) int

func OSTranslateSID

func OSTranslateSID(SID string) (string, error)

Note that all usages of TranslateSID gracefully handle the error, rather than throwing the error.

Types

type ACLEntry

type ACLEntry struct {
	Sections []string
}

field 5 and field 6 will contain SIDs. field 5 is a lone SID, but field 6 will contain SIDs under SID(.*)

type ACLList

type ACLList struct {
	Flags      string
	ACLEntries []ACLEntry
}

func (*ACLList) PortableString

func (a *ACLList) PortableString() string

PortableString returns a SDDL that's been ported from non-descript, well known SID strings (such as DU, DA, etc.) to domain-specific strings. This allows us to not mix up the admins from one domain to another. Azure Files requires that we do this.

func (*ACLList) String

func (a *ACLList) String() string

type SDDLString

type SDDLString struct {
	OwnerSID, GroupSID string
	DACL, SACL         ACLList
}

Owner and group SIDs need replacement

func ParseSDDL

func ParseSDDL(input string) (sddl SDDLString, err error)

func (SDDLString) Compare added in v10.14.0

func (s SDDLString) Compare(other SDDLString) bool

func (*SDDLString) PortableString

func (s *SDDLString) PortableString() string

func (*SDDLString) String

func (s *SDDLString) String() string

Jump to

Keyboard shortcuts

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