This file is indexed.

/usr/lib/ruby/vendor_ruby/influxdb/query/cluster.rb is in ruby-influxdb 0.2.3-2.

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
module InfluxDB
  module Query
    module Cluster # :nodoc:
      def create_cluster_admin(username, password)
        execute("CREATE USER #{username} WITH PASSWORD '#{password}' WITH ALL PRIVILEGES")
      end

      def list_cluster_admins
        list_users.select { |u| u['admin'] }.map { |u| u['username'] }
      end

      def revoke_cluster_admin_privileges(username)
        execute("REVOKE ALL PRIVILEGES FROM #{username}")
      end
    end
  end
end