lib/ohai/util/win32/group_helper.rb in ohai-14.4.2 vs lib/ohai/util/win32/group_helper.rb in ohai-14.5.0
- old
+ new
@@ -19,17 +19,20 @@
require "ohai/util/win32"
module Ohai
module Util
class Win32::GroupHelper
+ # @deprecated
# Per http://support.microsoft.com/kb/243330 SID: S-1-5-32-544 is the
# internal name for the Administrators group, which lets us work
# properly in environments with a renamed or localized name for the
# Administrators group
BUILTIN_ADMINISTRATORS_SID = "S-1-5-32-544".freeze
def self.windows_root_group_name
+ warn "The 'windows_root_group_name' helper is deprecated and will be removed in Ohai 15. Please update your plugins to remove this helper method."
+
administrators_sid_result = FFI::MemoryPointer.new(:pointer)
convert_result = Win32.convert_string_sid_to_sid(BUILTIN_ADMINISTRATORS_SID, administrators_sid_result)
last_win32_error = Win32.get_last_error
if convert_result == 0