hardcode "Apple Inc." vendor if on OSX

Signed-off-by: Eike Waldt <waldt@b1-systems.de>
This commit is contained in:
Eike Waldt 2019-07-12 14:02:16 +02:00
parent 64777457c9
commit 2700018c58
No known key found for this signature in database
GPG key ID: D1E0FBB747DCAE4B

View file

@ -30,7 +30,9 @@ module Inspec::Resources
# returns the Manufacturer of the local system
def manufacturer
os = inspec.os
if os.linux? || os.darwin?
if os.darwin?
'Apple Inc.'
elsif os.linux?
inspec.command("dmidecode | grep 'Vendor :'").split(": ").last.chomp
elsif os.windows?
inspec.powershell("Get-CimInstance -ClassName Win32_ComputerSystem | Select Manufacturer -ExpandProperty Manufacturer").stdout.chomp