summaryrefslogtreecommitdiff
path: root/lib/chef/win32/api
diff options
context:
space:
mode:
authornimisha <nimisha.sharad@msystechnologies.com>2017-12-18 14:43:58 +0530
committernimisha <nimisha.sharad@msystechnologies.com>2018-01-24 15:00:35 +0530
commitc855223ee54322e007d5f78087cf639e9685f1d5 (patch)
tree13c94c7b91f67c9eeb58d4b84d88c7b5cde98039 /lib/chef/win32/api
parentd77f8a3e115cd93f8dfcf7cc6d4090f792dadc15 (diff)
downloadchef-c855223ee54322e007d5f78087cf639e9685f1d5.tar.gz
Chef::ReservedNames::Win32::Security.has_admin_privileges? prints a debug message that contains token elevation information
Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
Diffstat (limited to 'lib/chef/win32/api')
-rw-r--r--lib/chef/win32/api/security.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/chef/win32/api/security.rb b/lib/chef/win32/api/security.rb
index a6f79f5d7d..6620f321aa 100644
--- a/lib/chef/win32/api/security.rb
+++ b/lib/chef/win32/api/security.rb
@@ -303,6 +303,17 @@ class Chef
:SecurityDelegation,
]
+ # https://msdn.microsoft.com/en-us/library/windows/desktop/bb530718%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
+ ELEVATION_TYPE = enum :ELEVATION_TYPE, [
+ :TokenElevationTypeDefault, 1,
+ :TokenElevationTypeFull,
+ :TokenElevationTypeLimited
+ ]
+
+ class TOKEN_ELEVATION_TYPE < FFI::Struct
+ layout :ElevationType, :ELEVATION_TYPE
+ end
+
# SECURITY_DESCRIPTOR is an opaque structure whose contents can vary. Pass the
# pointer around and free it with LocalFree.
# http://msdn.microsoft.com/en-us/library/windows/desktop/aa379561(v=vs.85).aspx