Ignore:
Timestamp:
06/13/11 15:15:08 (13 years ago)
Author:
tim
Message:

fixed error condition deadlock in regfi
prevented early garbage collection of hive file handles
fixed module imports under python3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/pyregfi/winsec.py

    r254 r255  
    1111import ctypes.util
    1212from ctypes import *
    13 import structures
     13from .structures import regfi
    1414
    1515is_win32 = hasattr(ctypes, 'windll')
     
    7777                        ('dacl', POINTER(WINSEC_ACL)),
    7878                        ]
    79 
    80 structures.regfi.winsec_sid2str.argtypes = [POINTER(WINSEC_DOM_SID)]
    81 structures.regfi.winsec_sid2str.restype = POINTER(c_char)
     79regfi.winsec_sid2str.argtypes = [POINTER(WINSEC_DOM_SID)]
     80regfi.winsec_sid2str.restype = POINTER(c_char)
    8281
    8382
     
    128127        self.inherited_object = _guid2uuid(ace.inh_guid)
    129128
    130         c_str = structures.regfi.winsec_sid2str(ace.trustee)
     129        c_str = regfi.winsec_sid2str(ace.trustee)
    131130        self.trustee = ctypes.cast(c_str, c_char_p).value.decode('utf-8', 'replace')
    132131        libc.free(c_str)
     
    153152
    154153    def __init__(self, sec_desc):
    155         c_str = structures.regfi.winsec_sid2str(sec_desc.owner_sid)
     154        c_str = regfi.winsec_sid2str(sec_desc.owner_sid)
    156155        self.owner = ctypes.cast(c_str, c_char_p).value.decode('utf-8', 'replace')
    157156        libc.free(c_str)
    158157       
    159         c_str = structures.regfi.winsec_sid2str(sec_desc.grp_sid)
     158        c_str = regfi.winsec_sid2str(sec_desc.grp_sid)
    160159        self.group = ctypes.cast(c_str, c_char_p).value.decode('utf-8', 'replace')
    161160        libc.free(c_str)
Note: See TracChangeset for help on using the changeset viewer.