diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-05-08 13:01:53 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-05-15 08:51:21 -0700 |
commit | 7f6631c20c71ff23cca265ae844f931cd2bd2776 (patch) | |
tree | 531f098421fb7cd814f8d5c4e47a92404a26bb36 /lib/chef/win32/api | |
parent | e90ff3c513b8f3dcbb55a769a2aece2fc0e15cd9 (diff) | |
download | chef-7f6631c20c71ff23cca265ae844f931cd2bd2776.tar.gz |
LogonUser uses ffi instead win32-api
Diffstat (limited to 'lib/chef/win32/api')
-rw-r--r-- | lib/chef/win32/api/security.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/chef/win32/api/security.rb b/lib/chef/win32/api/security.rb index 229f2ace10..95e7f4aab7 100644 --- a/lib/chef/win32/api/security.rb +++ b/lib/chef/win32/api/security.rb @@ -193,6 +193,20 @@ class Chef MAXDWORD = 0xffffffff + # LOGON32 constants for LogonUser + LOGON32_LOGON_INTERACTIVE = 2; + LOGON32_LOGON_NETWORK = 3; + LOGON32_LOGON_BATCH = 4; + LOGON32_LOGON_SERVICE = 5; + LOGON32_LOGON_UNLOCK = 7; + LOGON32_LOGON_NETWORK_CLEARTEXT = 8; + LOGON32_LOGON_NEW_CREDENTIALS = 9; + + LOGON32_PROVIDER_DEFAULT = 0; + LOGON32_PROVIDER_WINNT35 = 1; + LOGON32_PROVIDER_WINNT40 = 2; + LOGON32_PROVIDER_WINNT50 = 3; + ############################################### # Win32 API Bindings ############################################### @@ -405,6 +419,8 @@ class Chef safe_attach_function :SetSecurityDescriptorOwner, [ :pointer, :pointer, :BOOL ], :BOOL safe_attach_function :SetSecurityDescriptorSacl, [ :pointer, :BOOL, :pointer, :BOOL ], :BOOL safe_attach_function :GetTokenInformation, [ :HANDLE, :TOKEN_INFORMATION_CLASS, :pointer, :DWORD, :PDWORD ], :BOOL + safe_attach_function :LogonUserW, [:LPTSTR, :LPTSTR, :LPTSTR, :DWORD, :DWORD, :PHANDLE], :BOOL + end end end |