This file is indexed.

/usr/share/pyshared/virtinst/LiveCDInstaller.py is in virtinst 0.600.1-1ubuntu3.

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
#
# An installer class for LiveCD images
#
# Copyright 2007  Red Hat, Inc.
# Mark McLoughlin <markmc@redhat.com>
#
# 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., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.

import Installer
from VirtualDisk import VirtualDisk
from virtinst import _gettext as _

class LiveCDInstallerException(Exception):
    def __init__(self, msg):
        Exception.__init__(self, msg)

class LiveCDInstaller(Installer.Installer):

    # LiveCD specific methods/overwrites
    def _validate_location(self, val):
        path = None
        vol_tuple = None
        if type(val) is tuple:
            vol_tuple = val
        else:
            path = val

        disk = None
        if path or vol_tuple:
            disk = VirtualDisk(path=path,
                               conn=self.conn,
                               volName=vol_tuple,
                               device=VirtualDisk.DEVICE_CDROM,
                               readOnly=True)
        return disk
    def _get_location(self):
        return self._location
    def _set_location(self, val):
        self._validate_location(val)
        self._location = val
        self.cdrom = True
    location = property(_get_location, _set_location)


    # General Installer methods
    def prepare(self, guest, meter):
        self.cleanup()

        disk = self._validate_location(self.location)

        if not disk:
            raise ValueError(_("CDROM media must be specified for the live "
                               "CD installer."))

        self.install_devices.append(disk)

    def post_install_check(self, guest):
        return True

    def has_install_phase(self):
        return False

    # Internal methods
    def _get_bootdev(self, isinstall, guest):
        return self.bootconfig.BOOT_DEVICE_CDROM