This file is indexed.

/usr/share/pyshared/studentcontrolpanel/tcmplugins.py is in python-tcm 0.5.1-0ubuntu9.

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

import dbus
import dbus.service
import os
import string
import subprocess
import signal
import sys

def register_plugins():
		pluger = os.listdir('/usr/share/student-control-panel/plugins')
		sys.path.append('/usr/share/student-control-panel/plugins')
		plugin_list=[]
		for plugin in pluger:
			if plugin.find('__init__')==-1 and plugin.find('.pyc')==-1 and plugin.find('.pyo')==-1 and plugin.find('~')==-1:
				components = string.split(plugin, '.')
				#print imp.find_module(components[0], '/home/pete/scp/bzrscp/plugins/')
				try:
					mod = __import__(components[0])
				except ImportError:
					print "There was an error"
					continue

				#tmpreg=getattr(mod, 'plugins')

				#reg=getattr(tmpreg, components[0])

				try:
					clname = mod.register()['plugin_class']
				except AttributeError:
					print "This is not a valid plugin and will be skipped"
					continue

				name = components[0].replace('_',' ')
				plugin_list.append((name, clname, mod))
		return plugin_list