Documentation ¶
Overview ¶
Package winacl adds support for various Windows security APIs for Dokan.
Index ¶
Constants ¶
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 ¶
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 ¶
CurrentProcessPrimaryGroupSid is a utility to get the SID of the primary group of current user running the process.
func CurrentProcessUserSid ¶
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.