This file is indexed.

/usr/lib/grass64/etc/dm/cmd.tcl is in grass-gui 6.4.3-3.

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
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
namespace eval DmCmd {
    variable array opt # cmd options
    variable count 1
}


proc DmCmd::create { tree parent } {
    variable opt
    variable count 
    global dmpath

    set node "cmd:$count"

    set frm [ frame .cmdicon$count]
    set fon [font create -size 10] 
    set check [checkbutton $frm.check -font $fon \
                           -variable DmCmd::opt($count,_check) \
                           -height 1 -padx 0 -width 0]

    image create photo cico -file "$dmpath/cmd.gif"
    set ico [label $frm.ico -image cico -bd 1 -relief raised]
    
    pack $check $ico -side left

    $tree insert end $parent $node \
	-text      "cmd $count" \
	-window    $frm \
	-drawcross auto 

    set opt($count,_check) 1 

    set opt($count,cmd) "" 

    incr count
    return $node
}

proc DmCmd::set_option { node key value } {
    variable opt
 
    set id [Dm::node_id $node]
    set opt($id,$key) $value
}

# display cmd options
proc DmCmd::options { id frm } {
    variable opt

    # cmd name
    set row [ frame $frm.name ]
    Label $row.a -text [G_msg "Command:"] 
    Entry $row.b -width 40 -text "$opt($id,cmd)" \
          -textvariable DmCmd::opt($id,cmd)
    pack $row.a $row.b -side left
    pack $row -side top -fill both -expand yes
}

proc DmCmd::save { tree depth node } {
    variable opt
    
    set id [Dm::node_id $node]

    foreach key { _check cmd } {
        Dm::rc_write $depth "$key $opt($id,$key)"
    } 
}

proc DmCmd::display { node } {
    variable opt
    
    set tree $Dm::tree
    set id [Dm::node_id $node]

    if { ! ( $opt($id,_check) ) } { return } 

    if { $opt($id,cmd) == "" } { return } 

    set cmd $opt($id,cmd)

    runcmd $cmd
}

proc DmCmd::query { node } {
    puts "Query not supported for Command type layer"
}

proc DmCmd::duplicate { tree parent node id} {
    variable opt
    variable count 
    global dmpath

    set node "cmd:$count"

    set frm [ frame .cmdicon$count]
    set fon [font create -size 10] 
    set check [checkbutton $frm.check -font $fon \
                           -variable DmCmd::opt($count,_check) \
                           -height 1 -padx 0 -width 0]

    image create photo cico -file "$dmpath/cmd.gif"
    set ico [label $frm.ico -image cico -bd 1 -relief raised]
    
    pack $check $ico -side left

    $tree insert end $parent $node \
	-text      "cmd $count" \
	-window    $frm \
	-drawcross auto 

    set opt($count,_check) 1 

    set opt($count,cmd) "$opt($id,cmd)" 

    incr count
    return $node
}