diff options
author | John Keiser <jkeiser@opscode.com> | 2011-12-01 15:22:04 -0800 |
---|---|---|
committer | Seth Chisamore <schisamo@opscode.com> | 2011-12-08 20:11:12 -0500 |
commit | 6ae87ea5a15de1fc939506171f856251048e946e (patch) | |
tree | 557fd0a210f3697820f08e7c31660ed7bab8d19c /chef/lib/chef/win32/security.rb | |
parent | 38f48f9e75a572062fa6dddccc250dfe6c456a5e (diff) | |
download | chef-6ae87ea5a15de1fc939506171f856251048e946e.tar.gz |
Make Win32::Security raise on all error conditions
Diffstat (limited to 'chef/lib/chef/win32/security.rb')
-rw-r--r-- | chef/lib/chef/win32/security.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chef/lib/chef/win32/security.rb b/chef/lib/chef/win32/security.rb index 4e46c7268d..8a33b9032e 100644 --- a/chef/lib/chef/win32/security.rb +++ b/chef/lib/chef/win32/security.rb @@ -141,8 +141,8 @@ class Chef def get_named_security_info(path, type = :SE_FILE_OBJECT, info = OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION) security_descriptor = FFI::MemoryPointer.new :pointer hr = GetNamedSecurityInfoW(path.to_wstring, type, info, nil, nil, nil, nil, security_descriptor) - if FAILED(hr) - Chef::Win32::Error.raise! + if hr != ERROR_SUCCESS + Chef::Win32::Error.raise!("get_named_security_info(#{path}, #{type}, #{info})") end result_pointer = security_descriptor.read_pointer |