Documentation ¶
Index ¶
- Constants
- func CheckFileRights(filePath string) error
- func GetAce(acl *Acl, index uint32, ace **AccessAllowedAce) error
- func GetAclInformation(acl *Acl, info *AclSizeInformation, class uint32) error
- func GetNamedSecurityInfo(objectName string, objectType int32, secInfo uint32, ...) error
- type AccessAllowedAce
- type Acl
- type AclSizeInformation
Constants ¶
const ( SE_UNKNOWN_OBJECT_TYPE = iota SE_FILE_OBJECT )
https://docs.microsoft.com/en-us/windows/win32/api/accctrl/ne-accctrl-se_object_type
const ( ACCESS_ALLOWED_ACE_TYPE = 0 ACCESS_DENIED_ACE_TYPE = 1 FILE_ALL_ACCESS = (windows.STANDARD_RIGHTS_ALL | 0x1FF) )
const ( AclSizeInformationEnum = 2 DACL_SECURITY_INFORMATION = 0x00004 )
Variables ¶
This section is empty.
Functions ¶
func CheckFileRights ¶
CheckFileRights check that the given filename has access controls and system permission for Administrator, Local System
func GetAce ¶
func GetAce(acl *Acl, index uint32, ace **AccessAllowedAce) error
Obtain a pointer to an access control entry (ACE) in an access control list (ACL). For more information: https://docs.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-getace
func GetAclInformation ¶
func GetAclInformation(acl *Acl, info *AclSizeInformation, class uint32) error
Retrieve information about access control list (e.g a file) For more information: https://docs.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-getaclinformation
func GetNamedSecurityInfo ¶
func GetNamedSecurityInfo(objectName string, objectType int32, secInfo uint32, owner, group **windows.SID, dacl, sacl **Acl, secDesc *windows.Handle) error
Retrieve a copy of security descriptor for an object specified by name (e.g a file) For more information: https://docs.microsoft.com/en-us/windows/win32/api/aclapi/nf-aclapi-getnamedsecurityinfoa
Types ¶
type AccessAllowedAce ¶
type AccessAllowedAce struct { AceType uint8 AceFlags uint8 AceSize uint16 AccessMask uint32 SidStart uint32 }
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_access_allowed_ace