-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathlsa_generated.go
77 lines (69 loc) · 2.07 KB
/
lsa_generated.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// This file was autogenerated using go run mkcode.go -- lsa.go
// DO NOT EDIT.
package ntdll
import "unsafe"
var (
procLsaOpenPolicy = modntdll.NewProc("LsaOpenPolicy")
procLsaAddAccountRights = modntdll.NewProc("LsaAddAccountRights")
procLsaEnumerateAccountRights = modntdll.NewProc("LsaEnumerateAccountRights")
procLsaRemoveAccountRights = modntdll.NewProc("LsaRemoveAccountRights")
procLsaClose = modntdll.NewProc("LsaClose")
)
// INOUT-parameter: PolicyHandle.
func LsaOpenPolicy(
SystemName *LsaUnicodeString,
ObjectAttributes *LsaObjectAttributes,
DesiredAccess AccessMask,
PolicyHandle *LsaHandle,
) NtStatus {
r0, _, _ := procLsaOpenPolicy.Call(uintptr(unsafe.Pointer(SystemName)),
uintptr(unsafe.Pointer(ObjectAttributes)),
uintptr(DesiredAccess),
uintptr(unsafe.Pointer(PolicyHandle)))
return NtStatus(r0)
}
func LsaAddAccountRights(
PolicyHandle LsaHandle,
AccountSid *Sid,
UserRights *LsaUnicodeString,
CountOfRights uint32,
) NtStatus {
r0, _, _ := procLsaAddAccountRights.Call(uintptr(PolicyHandle),
uintptr(unsafe.Pointer(AccountSid)),
uintptr(unsafe.Pointer(UserRights)),
uintptr(CountOfRights))
return NtStatus(r0)
}
// OUT-parameter: UserRights, CountOfRights.
func LsaEnumerateAccountRights(
PolicyHandle LsaHandle,
AccountSid *Sid,
UserRights *LsaUnicodeString,
CountOfRights *uint32,
) NtStatus {
r0, _, _ := procLsaEnumerateAccountRights.Call(uintptr(PolicyHandle),
uintptr(unsafe.Pointer(AccountSid)),
uintptr(unsafe.Pointer(UserRights)),
uintptr(unsafe.Pointer(CountOfRights)))
return NtStatus(r0)
}
func LsaRemoveAccountRights(
PolicyHandle LsaHandle,
AccountSid *Sid,
AllRights bool,
UserRights *LsaUnicodeString,
CountOfRights uint32,
) NtStatus {
r0, _, _ := procLsaRemoveAccountRights.Call(uintptr(PolicyHandle),
uintptr(unsafe.Pointer(AccountSid)),
fromBool(AllRights),
uintptr(unsafe.Pointer(UserRights)),
uintptr(CountOfRights))
return NtStatus(r0)
}
func LsaClose(
ObjectHandle LsaHandle,
) NtStatus {
r0, _, _ := procLsaClose.Call(uintptr(ObjectHandle))
return NtStatus(r0)
}