This file is indexed.

/usr/share/rhn/actions/hardware.py is in rhn-client-tools 1.8.26-4.

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

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
44
45
46
#!/usr/bin/python


# Copyright (c) 1999--2012 Red Hat, Inc.  Distributed under GPLv2.
#
# Author: Adrian Likins <alikins@redhat.com>


# imports are a bit weird here to avoid name collions on "harware"
import sys
sys.path.append("/usr/share/rhn/")
from up2date_client import hardware
from up2date_client import up2dateAuth
from up2date_client import rpcServer
argVerbose = 0

__rhnexport__ = [
    'refresh_list' ]

# resync hardware information with the server profile
def refresh_list(cache_only=None):
    if cache_only:
        return (0, "no-ops for caching", {})

    # read all hardware in
    hardwareList = hardware.Hardware()

    s = rpcServer.getServer()

    if argVerbose > 1:
        print "Called refresh_hardware"

    try:
        s.registration.refresh_hw_profile(up2dateAuth.getSystemId(),
                                          hardwareList)
    except:
        print "ERROR: sending hardware database for System Profile"
        return (12, "Error refreshing system hardware", {})

    return (0, "hardware list refreshed", {})

def main():
	print refresh_list()

if __name__ == "__main__":
	main()