summaryrefslogtreecommitdiff
path: root/lib/chef/win32/file.rb
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2015-09-01 11:36:25 -0700
committerClaire McQuin <claire@getchef.com>2015-09-01 13:37:53 -0700
commit12425d32e29fd612a2afaa99a1978df1b600b941 (patch)
tree0f2e3ccdcb60504f085624f35211e9c79ad5ae9b /lib/chef/win32/file.rb
parent3770ec1025fd09d3a3bb393ad955ee2985252a67 (diff)
downloadchef-mcquin/refactor-wstring.tar.gz
Refactor Chef::Mixin::WideString to remove implicit Windows dependency.mcquin/refactor-wstring
Diffstat (limited to 'lib/chef/win32/file.rb')
-rw-r--r--lib/chef/win32/file.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/chef/win32/file.rb b/lib/chef/win32/file.rb
index 57347643fc..700ddb24d3 100644
--- a/lib/chef/win32/file.rb
+++ b/lib/chef/win32/file.rb
@@ -17,10 +17,11 @@
# limitations under the License.
#
+require 'chef/mixin/wide_string'
require 'chef/win32/api/file'
require 'chef/win32/api/security'
require 'chef/win32/error'
-require 'chef/mixin/wstring'
+require 'chef/win32/unicode'
class Chef
module ReservedNames::Win32
@@ -161,9 +162,9 @@ class Chef
def self.file_access_check(path, desired_access)
security_descriptor = Chef::ReservedNames::Win32::Security.get_file_security(path)
- token_rights = Chef::ReservedNames::Win32::Security::TOKEN_IMPERSONATE |
+ token_rights = Chef::ReservedNames::Win32::Security::TOKEN_IMPERSONATE |
Chef::ReservedNames::Win32::Security::TOKEN_QUERY |
- Chef::ReservedNames::Win32::Security::TOKEN_DUPLICATE |
+ Chef::ReservedNames::Win32::Security::TOKEN_DUPLICATE |
Chef::ReservedNames::Win32::Security::STANDARD_RIGHTS_READ
token = Chef::ReservedNames::Win32::Security.open_process_token(
Chef::ReservedNames::Win32::Process.get_current_process,
@@ -176,7 +177,7 @@ class Chef
mapping[:GenericExecute] = Chef::ReservedNames::Win32::Security::FILE_GENERIC_EXECUTE
mapping[:GenericAll] = Chef::ReservedNames::Win32::Security::FILE_ALL_ACCESS
- Chef::ReservedNames::Win32::Security.access_check(security_descriptor, duplicate_token,
+ Chef::ReservedNames::Win32::Security.access_check(security_descriptor, duplicate_token,
desired_access, mapping)
end