summaryrefslogtreecommitdiff
path: root/lib/chef/win32/net.rb
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-05-08 13:01:53 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-05-15 08:51:21 -0700
commit7f6631c20c71ff23cca265ae844f931cd2bd2776 (patch)
tree531f098421fb7cd814f8d5c4e47a92404a26bb36 /lib/chef/win32/net.rb
parente90ff3c513b8f3dcbb55a769a2aece2fc0e15cd9 (diff)
downloadchef-7f6631c20c71ff23cca265ae844f931cd2bd2776.tar.gz
LogonUser uses ffi instead win32-api
Diffstat (limited to 'lib/chef/win32/net.rb')
-rw-r--r--lib/chef/win32/net.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/chef/win32/net.rb b/lib/chef/win32/net.rb
index 41a8517952..0b095db2e9 100644
--- a/lib/chef/win32/net.rb
+++ b/lib/chef/win32/net.rb
@@ -18,6 +18,8 @@
require 'chef/win32/api/net'
require 'chef/win32/error'
+require 'chef/mixin/wstring'
+
class Chef
module ReservedNames::Win32
class NetUser
@@ -27,6 +29,9 @@ class Chef
include Chef::ReservedNames::Win32::API::Net
extend Chef::ReservedNames::Win32::API::Net
+ include Chef::Mixin::WideString
+ extend Chef::Mixin::WideString
+
def self.default_user_info_3
ui3 = USER_INFO_3.new.tap do |s|
{ usri3_name: nil,
@@ -208,13 +213,6 @@ END
private
- def self.wstring(str)
- if str.nil? || str.encoding == Encoding::UTF_16LE
- str
- else
- str.to_wstring
- end
- end
end
end