Lines Matching +full:- +full:- +full:revert
2 * The PCI Library -- Win32 helper functions
8 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include "win32-helpers.h"
17 /* Unfortunately i586-mingw32msvc toolchain does not provide this constant. */
93 if (len && buffer[len-1] == '\n') in win32_strerror()
94 buffer[--len] = '\0'; in win32_strerror()
95 if (len && buffer[len-1] == '\r') in win32_strerror()
96 buffer[--len] = '\0'; in win32_strerror()
97 if (len && buffer[len-1] == '.') in win32_strerror()
98 buffer[--len] = '\0'; in win32_strerror()
122 * Check for 64-bit system via IsWow64Process() function exported in win32_is_32bit_on_64bit_system()
123 * from 32-bit kernel32.dll library available on the 64-bit systems. in win32_is_32bit_on_64bit_system()
125 * primary running on 32-bit systems where are not available 64-bit in win32_is_32bit_on_64bit_system()
306 * Revert to the specified access token for the current thread. When access
307 * token is specified as NULL then revert to the primary process access token.
308 * Use to revert after win32_change_token() or change_token_to_primary() call.
314 * If SetThreadToken() call fails then there is no option to revert to in win32_revert_to_token()
315 * the specified previous thread access token. So in this case revert to in win32_revert_to_token()
326 * revert this privilege (if to revert whole token or only privilege).
339 * Indicate that correct revert method is just to in win32_enable_privilege()
363 * future revert. in win32_enable_privilege()
392 /* thread_token is set only when we were asked for revert method. */ in win32_enable_privilege()
401 /* thread_token is set only when we were asked for revert method. */ in win32_enable_privilege()
408 * Indicate that correct revert method is to change to the previous in win32_enable_privilege()
421 * Revert particular privilege for the current thread was previously enabled by
423 * or revert to previous access token.
545 * Windows 2000 to control client-side automatic inheritance (client - user in prepare_security_descriptor_for_set_operation()
546 * process - is responsible for propagating inherited ACEs to subobjects). in prepare_security_descriptor_for_set_operation()
547 * To prevent applications which do not understand client-side automatic in prepare_security_descriptor_for_set_operation()
554 * client-side automatic inheritance model and therefore prepare security in prepare_security_descriptor_for_set_operation()
559 * into security object only when they are set together with set-only flags in prepare_security_descriptor_for_set_operation()
706 …new_dacl_size = old_dacl->AclSize + sizeof(ACCESS_ALLOWED_ACE) + GetLengthSid(owner->Owner) - size… in grant_process_token_dacl_permissions()
719 * token with non-inherited granting access to specified permissions. in grant_process_token_dacl_permissions()
722 if (!InitializeAcl(new_dacl, new_dacl_size, old_dacl->AclRevision) || in grant_process_token_dacl_permissions()
723 !AddAccessAllowedAce(new_dacl, ACL_REVISION2, permissions, owner->Owner)) in grant_process_token_dacl_permissions()
736 if (old_dacl->AceCount > 0) in grant_process_token_dacl_permissions()
741 for (ace_index = 0; ace_index < old_dacl->AceCount; ace_index++) in grant_process_token_dacl_permissions()
744 !AddAce(new_dacl, old_dacl->AclRevision, MAXDWORD, ace, ((PACE_HEADER)ace)->AceSize)) in grant_process_token_dacl_permissions()
795 * Revert particular granted permissions in specified access token done by
824 * on older pre-Vista systems. When the current thread on these older in open_process_for_query()
873 * (7-bit ASCII string). Do case-insensitive string comparison. Process
890 path[path_length-exe_file_length-1] != L'\\') in check_process_name()
895 c1 = path[path_length-exe_file_length+i]; in check_process_name()
898 * Input string for comparison is 7-bit ASCII and file name part in check_process_name()
904 c1 -= L'a' - L'A'; in check_process_name()
906 c2 -= 'a' - 'A'; in check_process_name()
948 * On older NT-based systems these functions are available in in win32_find_and_open_process_for_query()
1025 * Final path length on the modern NT-based systems can be also larger. in win32_find_and_open_process_for_query()
1071 (!MyGetProcessImageFileNameW && (length == size || length == size-1))) in win32_find_and_open_process_for_query()
1107 * related to no open permissions. Revert DACL permissions after open attempt.
1122 * thread or process change or revert permissions. So try to execute in try_grant_permissions_and_open_process_token()
1199 * that process token and revert granted permissions. But this is in win32_open_process_token_with_rights()
1360 * but is using custom access token. There is no need to revert in win32_call_func_with_tcb_privilege()
1362 * be reverted. So there is no need to setup revert method for in win32_call_func_with_tcb_privilege()