winacl

package
v4.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: BSD-3-Clause, BSD-3-Clause, BSD-3-Clause, + 1 more Imports: 4 Imported by: 0

Documentation

Overview

Package winacl adds support for various Windows security APIs for Dokan.

Index

Constants

View Source
const (
	OwnerSecurityInformation     = SecurityInformation(0x1)
	GroupSecurityInformation     = SecurityInformation(0x2)
	DACLSecurityInformation      = SecurityInformation(0x4)
	SACLSecurityInformation      = SecurityInformation(0x8)
	LabelSecurityInformation     = SecurityInformation(0x10)
	AttributeSecurityInformation = SecurityInformation(0x20)
	ScopeSecurityInformation     = SecurityInformation(0x40)
	BackupSecurityInformation    = SecurityInformation(0x10000)
)

Various constants for SecurityInformation.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	// contains filtered or unexported fields
}

ACL is the type for access control lists.

func (*ACL) AddAllowAccess

func (acl *ACL) AddAllowAccess(accessMask uint32, sid *SID)

AddAllowAccess add a new ALLOW_ACCESS ACE to the ACL.

type SID

type SID syscallSID

SID is defined as syscall.SID on Windows.

func CurrentProcessPrimaryGroupSid

func CurrentProcessPrimaryGroupSid() (*SID, error)

CurrentProcessPrimaryGroupSid is a utility to get the SID of the primary group of current user running the process.

func CurrentProcessUserSid

func CurrentProcessUserSid() (*SID, error)

CurrentProcessUserSid is a utility to get the SID of the current user running the process.

type SecurityDescriptor

type SecurityDescriptor struct {
	// contains filtered or unexported fields
}

SecurityDescriptor is the type for security descriptors. Note that items have to be set in the following order: 1) owner, 2) group, 3) sacl, 4) dacl. Some of them may be omitted.

func NewSecurityDescriptorWithBuffer

func NewSecurityDescriptorWithBuffer(bs []byte) *SecurityDescriptor

NewSecurityDescriptorWithBuffer creates a new self-referential security descriptor in the buffer provided.

func (*SecurityDescriptor) HasOverflowed

func (sd *SecurityDescriptor) HasOverflowed() bool

HasOverflowed returns whether this security descriptor is too large for the provided buffer.

func (*SecurityDescriptor) SetDacl

func (sd *SecurityDescriptor) SetDacl(acl *ACL)

SetDacl sets a dacl in the security descriptor to the given ACL.

func (*SecurityDescriptor) SetGroup

func (sd *SecurityDescriptor) SetGroup(sid *SID)

SetGroup sets the owner field of a SecurityDescriptor.

func (*SecurityDescriptor) SetOwner

func (sd *SecurityDescriptor) SetOwner(sid *SID)

SetOwner sets the owner field of a SecurityDescriptor.

func (*SecurityDescriptor) Size

func (sd *SecurityDescriptor) Size() int

Size returns the size of the security descriptor. If the buffer is too small then it is the size that would be needed to store this SecurityDescriptor.

type SecurityInformation

type SecurityInformation uintptr

SecurityInformation is a bitmask of values.

Jump to

Keyboard shortcuts

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