

def change_privileges(self, enable_privs=[], disable_privs=[]):
    privs = []
    privs.extend(((_privileges.privilege(p).pyobject(), _privileges.PRIVILEGE_ATTRIBUTE.ENABLED) for p in enable_privs))
    privs.extend(((_privileges.privilege(p).pyobject(), 0) for p in disable_privs))
    old_privs = wrapped(win32security.AdjustTokenPrivileges, self.hToken, 0, privs)
    return ([_privileges.privilege(priv) for (priv, status) in old_privs if (status == _privileges.PRIVILEGE_ATTRIBUTE.ENABLED)], [_privileges.privilege(priv) for (priv, status) in old_privs if (status == 0)])

dataset/ETHPy150Open tjguk/winsys/winsys/_security/_tokens.py Token.change_privileges/original