Sha256: f34016adca498f2fc43805d2e3b5f540c68014d3430814c17cbb76938894500f
Contents?: true
Size: 461 Bytes
Versions: 14
Compression:
Stored size: 461 Bytes
Contents
# frozen_string_literal: true require_relative '../../../../facter/resolvers/windows/ffi/ffi' module IdentityFFI extend FFI::Library ffi_convention :stdcall ffi_lib :secur32 attach_function :GetUserNameExW, %i[uint32 lpwstr pointer], :win32_bool ffi_convention :stdcall ffi_lib :shell32 attach_function :IsUserAnAdmin, [], :win32_bool def self.privileged? result = self.IsUserAnAdmin() result && result != FFI::WIN32FALSE end end
Version data entries
14 entries across 14 versions & 1 rubygems