This file is indexed.

/usr/lib/ruby/vendor_ruby/specinfra/host_inventory/user.rb is in ruby-specinfra 2.66.0-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
module Specinfra
  class HostInventory
    class User < Base
      def get
        cmd = backend.command.get(:get_inventory_user)
        ret = backend.run_command(cmd)
        if ret.exit_status == 0
          parse(ret.stdout)
        else
          nil
        end
      end

      def parse(cmd_ret)
        users = {}
        lines = cmd_ret.split(/\n/)
        lines.each do |line|
          user = line.split(':')
          users[user[0]] = {
            'name' => user[0],
            'uid' => user[2],
            'gid' => user[3],
            'gecos' => user[4],
            'directory' => user[5],
            'shell' => user[6]
          }
        end
        users
      end
    end
  end
end