Documentation ¶
Index ¶
- func ACLAddControl(usernames []string, acl *windows.ACL, accessMask windows.ACCESS_MASK, ...) (*windows.ACL, error)
- func ACLSetControl(usernames []string, accessMask windows.ACCESS_MASK, ...) (*windows.ACL, error)
- func GetExplicitEntriesFromACL(acl *windows.ACL) (*[]windows.EXPLICIT_ACCESS, error)
- func GetFilePermissions(path string) ([]windows.EXPLICIT_ACCESS, error)
- func GetFileSecurityDescriptor(path string, secInfo windows.SECURITY_INFORMATION) ([]uint16, error)
- func GetSecurityDescriptorDACL(pSecDescriptor []uint16) (*windows.ACL, bool, bool, error)
- func IsValidSecDescriptor(secDescriptor []uint16) (bool, error)
- func MakeAbsoluteSD(selfRelative []uint16) ([]uint16, error)
- func MakeSelfRelativeSD(absoluteSD []uint16) ([]uint16, error)
- func ORAddFullPermissions(srcHivePath string, dstHivePath string, username string) error
- func ORCloseHive(key syscall.Handle) error
- func ORGetKeySecurityBuffer(key syscall.Handle, secInfo windows.SECURITY_INFORMATION) ([]uint16, error)
- func ORGetKeySecurityStructure(key syscall.Handle, secInfo windows.SECURITY_INFORMATION) (windows.SECURITY_DESCRIPTOR, error)
- func OROpenHive(hivePath string) (syscall.Handle, error)
- func ORSaveHive(key syscall.Handle, hivePath string) error
- func ORSetKeySecurity(key syscall.Handle, secInfo windows.SECURITY_INFORMATION, ...) error
- func SetFileACL(path string, acl *windows.ACL, inherit InheritMode) error
- func SetFilePermissions(usernames []string, path string, permissions windows.ACCESS_MASK, ...) error
- func SetFileSecurityDescriptor(path string, secDescriptor []uint16, secInfo windows.SECURITY_INFORMATION) error
- func SetSecurityDescriptorDACL(pSecDescriptor []uint16, acl *windows.ACL, present bool, defaulted bool) error
- type InheritMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ACLAddControl ¶ added in v0.1.1
func ACLAddControl(usernames []string, acl *windows.ACL, accessMask windows.ACCESS_MASK, accessMode windows.ACCESS_MODE) (*windows.ACL, error)
ACLAddControl adds the indicated permission in accessMask for the given users in an ACL
func ACLSetControl ¶ added in v0.1.1
func ACLSetControl(usernames []string, accessMask windows.ACCESS_MASK, accessMode windows.ACCESS_MODE) (*windows.ACL, error)
ACLSetControl makes an ACL with the indicated permission in accessMask for the given users
func GetExplicitEntriesFromACL ¶
func GetExplicitEntriesFromACL(acl *windows.ACL) (*[]windows.EXPLICIT_ACCESS, error)
GetExplicitEntriesFromACL gets a list of explicit entries from an ACL
func GetFilePermissions ¶ added in v0.1.1
func GetFilePermissions(path string) ([]windows.EXPLICIT_ACCESS, error)
GetFilePermissions return the list of Explicit entries on the file's DACL
func GetFileSecurityDescriptor ¶ added in v0.1.1
func GetFileSecurityDescriptor(path string, secInfo windows.SECURITY_INFORMATION) ([]uint16, error)
GetFileSecurityDescriptor returns a buffer with the file sec Descriptor
func GetSecurityDescriptorDACL ¶
GetSecurityDescriptorDACL gets an DACL from a security descriptor
func IsValidSecDescriptor ¶
IsValidSecDescriptor returns true is the secDescriptor is valid
func MakeAbsoluteSD ¶
MakeAbsoluteSD makes an absolute security descriptor out of a self-relative
func MakeSelfRelativeSD ¶
MakeSelfRelativeSD makes an absolute security descriptor out of a self-relative
func ORAddFullPermissions ¶
ORAddFullPermissions adds full control to a user over an offline registry hive.
func ORCloseHive ¶
ORCloseHive closes offline registry hive
func ORGetKeySecurityBuffer ¶
func ORGetKeySecurityBuffer(key syscall.Handle, secInfo windows.SECURITY_INFORMATION) ([]uint16, error)
ORGetKeySecurityBuffer Gets
func ORGetKeySecurityStructure ¶
func ORGetKeySecurityStructure(key syscall.Handle, secInfo windows.SECURITY_INFORMATION) (windows.SECURITY_DESCRIPTOR, error)
ORGetKeySecurityStructure Gets
func OROpenHive ¶
OROpenHive opens a registry hive outside the active system
func ORSaveHive ¶
ORSaveHive saves changes to the offline registry hive
func ORSetKeySecurity ¶
func ORSetKeySecurity(key syscall.Handle, secInfo windows.SECURITY_INFORMATION, secDescriptor []uint16) error
ORSetKeySecurity Gets
func SetFileACL ¶ added in v0.1.4
func SetFileACL(path string, acl *windows.ACL, inherit InheritMode) error
SetFileACL sets the given ACL to the object pointed to by path
func SetFilePermissions ¶ added in v0.1.1
func SetFilePermissions(usernames []string, path string, permissions windows.ACCESS_MASK, accessMode windows.ACCESS_MODE, inherit InheritMode, replace bool) error
SetFilePermissions gives the requested permissions to the given users on the given file. If replace is false, the new file permissions will include old permissions; it will only contain the ones set on this call otherwise
func SetFileSecurityDescriptor ¶ added in v0.1.1
func SetFileSecurityDescriptor(path string, secDescriptor []uint16, secInfo windows.SECURITY_INFORMATION) error
SetFileSecurityDescriptor sets a file security descriptor to the indicated file
Types ¶
type InheritMode ¶ added in v0.1.7
type InheritMode int
InheritMode tells the permissions changer how to set the object's inheritance
const ( // NoChange does not change the inheritance status NoChange InheritMode = iota // DoNotInherit disables inheritance DoNotInherit // Inherit enables inheritance Inherit )