Token privilege code use W() API + use of GetNamedSecurityInfoW in security.py (fix issue #40)

This commit is contained in:
hakril
2022-05-07 11:35:36 +02:00
parent 59e2cefee0
commit ad59298015
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -820,7 +820,7 @@ class SecurityDescriptor(gdef.PSECURITY_DESCRIPTOR):
if query_sacl:
flags |= gdef.SACL_SECURITY_INFORMATION
winproxy.GetNamedSecurityInfoA(
winproxy.GetNamedSecurityInfoW(
objname,
objtype,
flags,
+2 -2
View File
@@ -115,12 +115,12 @@ class TokenPrivileges(gdef.TOKEN_PRIVILEGES):
def _lookup_name(self, luid):
size = gdef.DWORD(0x100)
buff = ctypes.c_buffer(size.value)
winproxy.LookupPrivilegeNameA(None, luid, buff, size)
winproxy.LookupPrivilegeNameW(None, luid, buff, size)
return buff[:size.value]
def _lookup_value(self, name):
luid = gdef.LUID()
winproxy.LookupPrivilegeValueA(None, name, ctypes.byref(luid))
winproxy.LookupPrivilegeValueW(None, name, ctypes.byref(luid))
return luid