|
@@ -300,17 +300,17 @@ def acl_get(path, item, st, numeric_owner=False):
|
|
continue
|
|
continue
|
|
permissions = {'user': {'name': name, 'sid': sidstr}, 'permissions': (ACEs[i].grfAccessPermissions, ACEs[i].grfAccessMode, ACEs[i].grfInheritance)}
|
|
permissions = {'user': {'name': name, 'sid': sidstr}, 'permissions': (ACEs[i].grfAccessPermissions, ACEs[i].grfAccessMode, ACEs[i].grfInheritance)}
|
|
pyDACL.append(permissions)
|
|
pyDACL.append(permissions)
|
|
- item.win_dacl = safe_encode(json.dumps(pyDACL))
|
|
|
|
|
|
+ item['win_dacl'] = safe_encode(json.dumps(pyDACL))
|
|
|
|
|
|
free(SD)
|
|
free(SD)
|
|
LocalFree(<HLOCAL>ACEs)
|
|
LocalFree(<HLOCAL>ACEs)
|
|
|
|
|
|
|
|
|
|
def acl_set(path, item, numeric_owner=False):
|
|
def acl_set(path, item, numeric_owner=False):
|
|
- if b'win_dacl' not in item:
|
|
|
|
|
|
+ if 'win_dacl' not in item:
|
|
return
|
|
return
|
|
|
|
|
|
- pyDACL = json.loads(safe_decode(item.win_dacl))
|
|
|
|
|
|
+ pyDACL = json.loads(safe_decode(item['win_dacl']))
|
|
cdef _EXPLICIT_ACCESS_W* ACEs = <_EXPLICIT_ACCESS_W*>calloc(sizeof(_EXPLICIT_ACCESS_W), len(pyDACL))
|
|
cdef _EXPLICIT_ACCESS_W* ACEs = <_EXPLICIT_ACCESS_W*>calloc(sizeof(_EXPLICIT_ACCESS_W), len(pyDACL))
|
|
cdef wchar_t* temp
|
|
cdef wchar_t* temp
|
|
cdef PSID newsid
|
|
cdef PSID newsid
|