mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-01 22:57:29 -04:00
windows: use correct type for security attributes' descriptor member
The SECURITY_ATTRIBUTES struct always takes a SECURITY_DESCRIPTOR pointer. Now that we've defined SECURITY_DESCRIPTOR, make SECURITY_ATTRIBUTES properly specify the type. This eliminates the need for terrible uintptr(unsafe.Pointer(...)) casts everywhere. Change-Id: Ibbc85524cfe33589d43f963e10aa19d7f47686f2 Reviewed-on: https://go-review.googlesource.com/c/sys/+/196797 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
This commit is contained in:
@@ -901,6 +901,12 @@ type SECURITY_DESCRIPTOR struct {
|
|||||||
dacl *ACL
|
dacl *ACL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SecurityAttributes struct {
|
||||||
|
Length uint32
|
||||||
|
SecurityDescriptor *SECURITY_DESCRIPTOR
|
||||||
|
InheritHandle uint32
|
||||||
|
}
|
||||||
|
|
||||||
type SE_OBJECT_TYPE uint32
|
type SE_OBJECT_TYPE uint32
|
||||||
|
|
||||||
// Constants for type SE_OBJECT_TYPE
|
// Constants for type SE_OBJECT_TYPE
|
||||||
|
|||||||
@@ -471,12 +471,6 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
type SecurityAttributes struct {
|
|
||||||
Length uint32
|
|
||||||
SecurityDescriptor uintptr
|
|
||||||
InheritHandle uint32
|
|
||||||
}
|
|
||||||
|
|
||||||
type Overlapped struct {
|
type Overlapped struct {
|
||||||
Internal uintptr
|
Internal uintptr
|
||||||
InternalHigh uintptr
|
InternalHigh uintptr
|
||||||
|
|||||||
Reference in New Issue
Block a user