mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
fix for solaris
This commit is contained in:
parent
78a47aa43b
commit
23cfc3c4bd
1 changed files with 8 additions and 9 deletions
|
@ -270,7 +270,7 @@ module Inspec::Resources
|
|||
|
||||
# returns optional information about a user, eg shell
|
||||
def meta_info(_username)
|
||||
{}
|
||||
nil
|
||||
end
|
||||
|
||||
# returns a hash with meta-data about user credentials
|
||||
|
@ -281,7 +281,7 @@ module Inspec::Resources
|
|||
# }
|
||||
# this method is optional and may not be implemented by each provider
|
||||
def credentials(_username)
|
||||
{}
|
||||
nil
|
||||
end
|
||||
|
||||
# returns an array with users
|
||||
|
@ -292,9 +292,12 @@ module Inspec::Resources
|
|||
# retuns all aspects of the user as one hash
|
||||
def user_details(username)
|
||||
item = {}
|
||||
item.merge!(identity(username))
|
||||
item.merge!(meta_info(username))
|
||||
item.merge!(credentials(username))
|
||||
id = identity(username)
|
||||
item.merge!(id) unless id.nil?
|
||||
meta = meta_info(username)
|
||||
item.merge!(meta) unless meta.nil?
|
||||
cred = credentials(username)
|
||||
item.merge!(cred) unless cred.nil?
|
||||
item
|
||||
end
|
||||
|
||||
|
@ -408,10 +411,6 @@ module Inspec::Resources
|
|||
@id_cmd ||= 'id -a'
|
||||
super
|
||||
end
|
||||
|
||||
def credentials(_username)
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
class AixUser < UnixUser
|
||||
|
|
Loading…
Reference in a new issue