summaryrefslogtreecommitdiff
path: root/lib/chef/win32
diff options
context:
space:
mode:
authornimisha <nimisha.sharad@msystechnologies.com>2018-01-24 13:23:02 +0530
committernimisha <nimisha.sharad@msystechnologies.com>2018-01-24 15:00:41 +0530
commitb07a4f4b8da44bf35d9dbe879e1cf4fd2f040644 (patch)
tree74b0f71c5cd33b28d461c87cf7fd2f5ca1870022 /lib/chef/win32
parent7381679100ca96c63751cadff8b54722aefed5f4 (diff)
downloadchef-b07a4f4b8da44bf35d9dbe879e1cf4fd2f040644.tar.gz
Fixed review comments
Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
Diffstat (limited to 'lib/chef/win32')
-rw-r--r--lib/chef/win32/security.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/win32/security.rb b/lib/chef/win32/security.rb
index c658c8f70f..63b626b1d7 100644
--- a/lib/chef/win32/security.rb
+++ b/lib/chef/win32/security.rb
@@ -350,7 +350,8 @@ class Chef
end
info_ptr = FFI::MemoryPointer.new(:pointer)
token_info_pointer = TOKEN_ELEVATION_TYPE.new info_ptr
- unless GetTokenInformation(token.handle.handle, :TokenElevationType, token_info_pointer, 4, token_result_size)
+ token_info_length = 4
+ unless GetTokenInformation(token.handle.handle, :TokenElevationType, token_info_pointer, token_info_length, token_result_size)
Chef::ReservedNames::Win32::Error.raise!
end
token_info_pointer[:ElevationType]