This file is indexed.

/usr/share/doc/graphviz/examples/demo/modgraph.tcl is in graphviz-doc 2.40.1-2.

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
47
48
#!/usr/bin/tclsh

# display the kernel module dependencies 

# author: John Ellson <ellson@research.att.com>

package require gv

set f [open /proc/modules r]
set modules [read -nonewline $f]
close $f

set G [gv::digraph G]
set N [gv::protonode $G]
set E [gv::protoedge $G]

gv::setv $G rankdir LR
gv::setv $G nodesep .05
gv::setv $N shape box
gv::setv $N width 0
gv::setv $N height 0
gv::setv $N margin .03
gv::setv $N fontsize 8
gv::setv $N fontname helvetica
gv::setv $E arrowsize .4

# prepare a subraph for rootnodes - populated later
set sg [gv::graph $G rootnodes]
gv::setv $sg rank same

# extract graph from /proc/modules
foreach rec [split $modules \n] {
  set n [gv::node $G [lindex $rec 0]]
  foreach usedby [split [lindex $rec 3] ,] {
    if {[string equal $usedby -] || [string equal $usedby {}]} {continue}
    set e [gv::edge $n [gv::node $G $usedby]]
  }
}

# add all rootnodes to subgraph with rank=same
for { set n [gv::firstnode $G] } { [ gv::ok $n] } { set n [gv::nextnode $G $n] } {
  if { ! [ gv::ok [ gv::firstin $n ] ] } {
    gv::node $sg [gv::nameof $n]
  }
}

gv::layout $G dot
gv::render $G xlib