ace

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: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessControlEntry

type AccessControlEntry struct {
	Index                   uint16
	Header                  header.AccessControlEntryHeader
	Mask                    mask.AccessControlMask
	Identity                identity.Identity
	AccessControlObjectType object.AccessControlObjectType

	// ApplicationData holds the optional, variable-length trailing bytes of an
	// ACE that follow the fixed fields. For callback ACE types
	// (ACCESS_ALLOWED_CALLBACK, ACCESS_DENIED_CALLBACK and their object/audit
	// variants) this is the conditional expression; for
	// SYSTEM_RESOURCE_ATTRIBUTE and SYSTEM_SCOPED_POLICY_ID ACEs it is the
	// attribute or policy data. The length is derived from the ACE Header.Size.
	// These bytes are preserved verbatim so that Marshal(Unmarshal(x)) == x.
	ApplicationData []byte

	// Internal
	RawBytes     []byte
	RawBytesSize uint32
}

AccessControlEntry represents an entry in an access control list (ACL).

func (*AccessControlEntry) Describe

func (ace *AccessControlEntry) Describe(indent int)

Describe prints a detailed description of the AccessControlEntry struct, including its attributes formatted with indentation for clarity.

Parameters:

  • indent (int): The indentation level for formatting the output. Each level increases the indentation depth, allowing for a hierarchical display of the ACE's components.

func (*AccessControlEntry) Equal

func (ace *AccessControlEntry) Equal(other *AccessControlEntry) bool

Equal checks if two AccessControlEntry objects are equal by comparing all their fields.

Parameters: - other: The other AccessControlEntry to compare with

Returns: - bool: true if the AccessControlEntries are equal, false otherwise

func (*AccessControlEntry) HasFlag

func (ace *AccessControlEntry) HasFlag(flag uint8) bool

HasFlag checks if a specific flag is set within the ACE's flags.

Parameters: - flag: The integer value of the flag to check.

Returns: - bool: true if the specified flag is set, false otherwise.

func (*AccessControlEntry) IsInherited

func (ace *AccessControlEntry) IsInherited() bool

IsInherited checks whether the Access Control Entry (ACE) is inherited from a parent object. This is determined by checking if the ACE_FLAG_INHERITED is present in the Flags.Values slice of the ACE header.

Returns: - bool: true if the ACE is inherited, false otherwise.

func (*AccessControlEntry) Marshal

func (ace *AccessControlEntry) Marshal() ([]byte, error)

Marshal serializes the AccessControlEntry struct into a byte slice.

Returns:

  • []byte: The serialized byte slice representing the ACE.

func (*AccessControlEntry) Unmarshal

func (ace *AccessControlEntry) Unmarshal(marshalledData []byte) (int, error)

Unmarshal initializes the AccessControlEntry struct by parsing the raw byte slice. It sets the RawBytes and RawBytesSize fields, parses the header, and then parses the ACE.

Parameters:

  • rawBytes ([]byte): The raw byte slice to be parsed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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