This file is indexed.

/usr/lib/ruby/vendor_ruby/serverspec/type/user.rb is in ruby-serverspec 2.37.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
module Serverspec::Type
  class User < Base
    def exists?
      @runner.check_user_exists(@name)
    end

    def belongs_to_group?(group)
      @runner.check_user_belongs_to_group(@name, group)
    end

    def belongs_to_primary_group?(group)
      @runner.check_user_belongs_to_primary_group(@name, group)
    end

    def has_uid?(uid)
      @runner.check_user_has_uid(@name, uid)
    end

    def has_home_directory?(path)
      @runner.check_user_has_home_directory(@name, path)
    end

    def has_login_shell?(shell)
      @runner.check_user_has_login_shell(@name, shell)
    end

    def has_authorized_key?(key)
      @runner.check_user_has_authorized_key(@name, key)
    end

    def minimum_days_between_password_change
      @runner.get_user_minimum_days_between_password_change(@name).stdout.to_i
    end

    def maximum_days_between_password_change
      @runner.get_user_maximum_days_between_password_change(@name).stdout.to_i
    end

    def encrypted_password
      @runner.get_user_encrypted_password(@name).stdout.strip
    end 
  end
end