This file is indexed.

/usr/lib/python2.7/dist-packages/ocfs2interface/console.py is in ocfs2console 1.6.4-3.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
 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# OCFS2Console - GUI frontend for OCFS2 management and debugging
# Copyright (C) 2002, 2005 Oracle.  All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.

import gtk

from guiutil import set_props, error_box

from partitionview import PartitionView
from menu import Menu
from toolbar import Toolbar
from about import about, process_gui_args
from mount import mount, unmount
from format import format_partition
from fsck import fsck_volume
from tune import tune_label, tune_slots
from general import General
from bosa import Browser
from nodeconfig import node_config
from pushconfig import push_config

info_items = (
    ('General',          General),
    ('File Listing',     Browser),
)

class Console(gtk.Window):
    def __init__(self):
        gtk.Window.__init__(self)

        set_props(self, title='OCFS2 Console',
                        default_width=600,
                        default_height=460,
                        border_width=0)

        self.connect('delete_event', self.cleanup)

        notebook = gtk.Notebook()
        notebook.set_tab_pos(gtk.POS_TOP)

        info_frames = []

        for desc, info in info_items:
            frame = gtk.Frame()
            set_props(frame, shadow=gtk.SHADOW_NONE,
                             border_width=0)

            notebook.add_with_properties(frame, 'tab_label', desc)

            info_frames.append((frame, info))

        self.pv = PartitionView(info_frames)
        self.pv.set_size_request(-1, 100)

        vbox = gtk.VBox()
        self.add(vbox)

        menu = Menu(self)

        menubar, sel_items, unmounted_items = menu.get_widgets()
        vbox.pack_start(menubar, expand=False, fill=False)

        self.pv.add_sel_widgets(sel_items)
        self.pv.add_unmount_widgets(unmounted_items)

        toolbar = Toolbar(self)

        tb, buttons, filter_entry = toolbar.get_widgets()
        vbox.pack_start(tb, expand=False, fill=False)

        self.pv.add_mount_widgets([buttons['unmount']])
        self.pv.add_unmount_widgets([buttons['mount']])

        filter_entry.connect('activate', self.refresh)

        self.pv.set_filter_entry(filter_entry)

        vpaned = gtk.VPaned()
        vpaned.set_border_width(4)
        vbox.pack_start(vpaned, expand=True, fill=True)

        scrl_win = gtk.ScrolledWindow()
        set_props(scrl_win, hscrollbar_policy=gtk.POLICY_AUTOMATIC,
                            vscrollbar_policy=gtk.POLICY_AUTOMATIC)
        scrl_win.add(self.pv)
        vpaned.pack1(scrl_win)

        vpaned.pack2(notebook)

        self.pv.grab_focus()
        self.show_all()

        self.refresh()

    def cleanup(self, *args):
        gtk.main_quit()

    def about(self):
        about(self)

    def refresh(self, *args):
        self.pv.refresh_partitions()

    def mount(self):
        device, mountpoint = self.pv.get_sel_values()
        mount(self, device)

    def unmount(self):
        device, mountpoint = self.pv.get_sel_values()
        unmount(self, device, mountpoint)

    def format(self):
        format_partition(self, self.pv.get_device())

    def relabel(self):
        tune_label(self, self.pv.get_device())

    def slot_num(self):
        tune_slots(self, self.pv.get_device())

    def check(self):
        fsck_volume(self, self.pv.get_device(), check=True)

    def repair(self):
        fsck_volume(self, self.pv.get_device(), check=False)

    def node_config(self):
        node_config(self)

    def push_config(self):
        push_config(self)

def main():
    from about import process_gui_args
    process_gui_args()
    console = Console()
    gtk.main()

if __name__ == '__main__':
    main()